3
class Foo(@BeanProperty var bar:String) {

  def setBar(d:Double) {
    bar = d.toString
  }

}

This produces "error: ambiguous reference to overloaded definition, both method setBar in class Foo of type (x$1: String)Unit and method setBar in class Foo of type (d: Double)Unit match expected type ? class Foo(@BeanProperty var bar:String) {"

How can setBar(x:String) be ambiguous with setBar(d:Double)? Or is that not what the error message is trying to convey?

1
  • Try marking the whole class with @BeanInfo instead of marking each member with @BeanProperty. Maybe that will help...
    – agilesteel
    Jul 15, 2011 at 7:43

1 Answer 1

1

Looks like a bug. Please file an ticket on issues.scala-lang.org.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.