3
votes
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

1 Answers

1
votes

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