You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This compiles in Scala 2.13.0, but we have an error in Dotty (0.18.x on master), this would be an issue for porting Fastparse 2. It compiles in Dotty if we remove the type parameters on foo.
-- [E051] ReferenceError: local/Overloads.scala:9:2---------------------------9| foo(1)
|^^^|Ambiguous overload. The overloaded alternatives of method foo in objectOverloadswith types
| [V](x: Int):Nothing| [V](x: Int, y: Int):Nothing| [V](x: Int, y: Int, z: Int):Nothing|all match arguments (Int(1))
Explanation===========There are 3 methods that could be referenced asthe compiler knows too little
about the expected type.
You may specify the expected typee.g. by
- assigning it to a value with a specified type, or
- adding a typeascriptionasin instance.myMethod:String=>Int
The text was updated successfully, but these errors were encountered:
bishabosha
changed the title
Ambiguous Overload when using default arguments
Ambiguous Overload when using default arguments with type parameters
Aug 22, 2019
Uh oh!
There was an error while loading. Please reload this page.
minimized code
expectation
This compiles in Scala 2.13.0, but we have an error in Dotty (0.18.x on master), this would be an issue for porting Fastparse 2. It compiles in Dotty if we remove the type parameters on foo.
The text was updated successfully, but these errors were encountered: