Closed
Description
Compiler version
3.1.2-RC1-bin-20211205-94f4118-NIGHTLY
Minimized code
class A
class B
def f(using a: A): Int = 42
def f(using b: B): Int = 41
@main def m14 =
given A = new A
assert(f == 42)
Output
assert(f == 42)
^
Ambiguous overload. The overloaded alternatives of method f in package overload_issue with types
(using b: overload_issue.B): Int
(using a: overload_issue.A): Int
both match expected type ?{ == : ? }
Expectation
Compile or give a less cryptic expected type than ?{ == : ? }
.
This works fine without this line: def f(using b: B): Int = 41
.
Metadata
Metadata
Assignees
Labels
No labels