-
Notifications
You must be signed in to change notification settings - Fork 1.1k
A method is not a member of a class even though it is (and can be seen using javap) #13957
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
Comments
It’s worth noting that it’s also does not work in scala 2.13 |
Possibly related recent issue where fluent API in Java breaks in Scala #13841 |
I cannot reproduce the issue. Even if I check out the scala_bug repository and try to compile the code, everything seems to work fine |
It looks like this works with JDK 8 but not JDK 11. @matviichukv which java version are you using? |
I use JDK 11 |
Ok, so at least this seems consistent. But still this will need a minimization without an external dependency. |
I may be misunderstanding what you're talking about here, but I don't seem to be able to get it working on either 8 or 11. Minimized repro, which compiles fine using javac output:
I didn't test this with dotty, but I'm assuming it's the same behavior. Setting that up should be trivial, and i'm happy to do it if this isn't a sufficient repro
|
@DhashS in your example you call |
Oh. Serves me right for attempting this at 3am. I'll try and get a legit minimal repro pushed to that repo today 😅. My bad |
works again on JDK 17.
I wonder if I should PR it upstream
|
Compiler version
3.1.0
Minimized code
Output
Expectation
It should compile without any errors.
I've made a small repo to easily reproduce this error: https://github.com/matviichukv/scalac_bug . Main.scala fails with this error, while Main.java compiles just fine. Same happens with .embedded method, but all others are fine. attr method is not shown for completion in sbt shell. Invoking it using the java.reflect things calls the method just fine.
Here's the output of javap on the GraphOutput.java from [email protected]
The text was updated successfully, but these errors were encountered: