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 开发者_如何学Cnot what the error message is trying to convey?
Looks like a bug. Please file an ticket on issues.scala-lang.org.
精彩评论