Skip to content

Instantly share code, notes, and snippets.

@teaplanet
Created May 27, 2010 14:12
Show Gist options
  • Select an option

  • Save teaplanet/415841 to your computer and use it in GitHub Desktop.

Select an option

Save teaplanet/415841 to your computer and use it in GitHub Desktop.
package sample
trait T {
def names(names:List[String], man:Boolean=true):Unit = {} // これを消すと正常動作
def names(name:String, man:Boolean=true):Unit = {}
}
object O extends T {
def call = {
names("name") // Error
}
}
/* Error:
ambiguous reference to overloaded definition, both method names$default$2 in trait T of type => Boolean and method names$default$2 in trait T of type => Boolean match expected type Boolean
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment