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
{{ message }}
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
objectA:deff(s: Int) = s
objectB:deff(s: String) = s
importA.fimportB.f
println(f(1))
^
Reference to f is ambiguous,
it is both imported by name by importA.f
and imported by name subsequently by importB.f
Expectation
The compiler should behave the same as in the code below, that is, as if the definitions above is overloaded.
objectC:deff(s: Int) = s
deff(s: String) = s
importC.f
println(f(1))
//1
Minimized code + Output
Expectation
The compiler should behave the same as in the code below, that is, as if the definitions above is overloaded.
See https://docs.oracle.com/javase/specs/jls/se15/html/jls-15.html#jls-15.12.1 for how member methods that are imported by static-import declarations are processed in Java.
The text was updated successfully, but these errors were encountered: