Created
May 27, 2010 14:12
-
-
Save teaplanet/415841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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