Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- */
Add Comment
Please, Sign In to add comment