Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:34:11+00:00 2026-06-05T18:34:11+00:00

In Scala IDE I get the following error about the class I am to

  • 0

In Scala IDE I get the following error about the class I am to compile:

in object MapArea, multiple overloaded alternatives of method addAnim
define default arguments.

So yes, They do! So what? I do not understand the philosophy of this…

UPDATE:

It turns out that there could be a situation where compiler can’t know which method to choose (as pointed out by Tomasz Nurkiewicz), ok I understand.. but in my situation these two methods can clearly be distinguished. Here is the exact piece of code (with all original names and stuff preserved this time):

  def addAnim (name: String, x: Float, y: Float, tex: Buffer[Texture], fps: Int, percent: Float = 0): TImageSequence =
    addAnim (name, x, y, tex(0).getImage.getWidth, tex(0).getImage.getHeight, tex, fps, percent)

  def addAnim (name: String, x: Float, y: Float, w: Float, h: Float, tex: Buffer[Texture], fps: Int, percent: Float = 0): TImageSequence = {
     // do stuff
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:34:13+00:00Added an answer on June 5, 2026 at 6:34 pm

    It isn’t possible to have two methods with default parameters and with the same name.
    Scala generates methods to obtain default values with names based on target method’s name, so some sort of name collision may occur.

    scala> object Test {
         |   def m(i: String = "Default value") {}
         | }
    defined module Test
    
    scala> Test.`m$default$1`
    res0: String = Default value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Scala IDE I have the following code: package pkg.one object S { class
scala> class A (s: String*) { val l: ListBuffer[String] = ListBuffer[String](s) } <console>:8: error:
I am learning Scala with Scala-IDE in Eclipse. While following the Chapter 9: Control
I'm following the instructions here: http://blog.colinajohnston.com/scala-ide-200rc2-sbt-0112-lift-24-m5-now-with to setup eclipse with lift and sbt but
If in Scala IDE try the following: val chars = Array[Char](256) it is all
I have the following class definition in Scala: class AppendErrorMessageCommand private(var m_type: Byte) {
I have the following code in Scala-IDE: type myF = () => Boolean def
scala> Array.fill(3){ math.random } <console>:6: error: value fill is not a member of object
Currently I'm using Scala IDE, and the version of Scala it's using for my
What's the recommended way of getting Scala IDE for Eclipse to reference the scala-compiler.jar?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.