-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ambiguous overload using JDK 11 #10715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
Same in Scala 2, as the non-nullary method is overridden for more specific return type. Workaround:
or just use parens. |
It can also be done with an explicit val p = decoderOut.position() Thus, I don't think this needs a fix. |
I'm not sure, we're supposed to support calling Java methods without |
TheElectronWill
added a commit
to TheElectronWill/dotty
that referenced
this issue
Nov 10, 2022
little-inferno
pushed a commit
to little-inferno/dotty
that referenced
this issue
Jan 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimized code
The following code can be compiled using JDK 8. However, it will output ambiguous overload error when using JDK 11.
Environment:
Ubuntu
openjdk 1.8.0_275
openjdk 11.0.9.1
Output
Expectation
The compiler shoud find and use
position(): Int
here.The text was updated successfully, but these errors were encountered: