-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
InternalError "Enclosing method not found" #18701
Comments
in Scala 2.13.12 it will print |
Yes sorry, the point was that it crashes in Scala 3. The print statement is useless and can be disregarded. |
No need to apologise, I was just adding extra context that indeed this is unexpected behaviour, because it works in 2.13 |
Is there any chance to get this fixed in the near future? |
Testing the issue authors code in 3.4.2, it builds fine but the error occurs at runtime. I have an example that fails with the same(?) error at the analysis phase.
|
I've been trying to migrate to scala 3.5.2 and I'm hitting the same issue, however I have a somewhat large app (56kloc) and I haven't been able to see yet what is triggering the:
in native-image. This app works fine in scala 2.13. Here is link to the CI failure: My guess is there are more variants of the problem that this issue was filed for, but I don't know how to get native-image to tell me where it is when it fails, and hunting through this rather large app seems a bit daunting. |
In our case the bug happened in skunk and because of this we need a new release of skunk built on a fixed version of Scala 3. It doesn't help to upgrade our code to Scala 3.3.4/3.5.2, since the invalid byte code is in the skunk jar. We tried to build skunk ourselves with Scala 3.3.4 and then it works fine. Maybe you have something similar with another lib... |
We have a problem stopping us from updating to Scala 3, since we use Graalvm native-image. Native image uses a lot reflection when building and the byte code generated by Scala 3 seems to be invalid in some edge cases. For us the error happens in the skunk database library typelevel/skunk#623. I've finally been able to create a small reproducer, I think.
It breaks when Class.getEnclosingMethod() is called for the check() method below.
Compiler version
3.3.1
Minimized code
Output
InternalError
Expectation
The enclosing method should be returned
The text was updated successfully, but these errors were encountered: