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
main (97677cc), 3.3.0 and likely any previous version
Minimized code
deff(s: Int):Unit= println("a")
deff:Int=>Unit= _ => println("b")
@main defTest=valtest:Int=>Unit= f
test(0)
// f(0) // this errors out as expected
Output
Compiles, and when run prints "a".
Expectation
Should error out with an Ambiguous Overload error, like using f directly does.
Additional comment
I found this when working on #18286, and I know that resolveOverloaded1 method here can affect which f is being chosen - so the issue likely lies somewhere there.