-
Notifications
You must be signed in to change notification settings - Fork 21
"bad constant pool tag 17" when using a library compiled using Java 21 #12936
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
Reproducer public class A {
int f(Object s) {
switch(s) {
case Res.R -> {
return 1;
}
default -> {
return 3;
}
}
}
static enum Res {
R
}
} |
Where's 17? Oh it was added in Java 11. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4-210. Why did nobody tell us? 🙃 |
Seems like Scala missed the tag 17 and has a tag 2. |
That's entertaining; trivia on https://stackoverflow.com/a/63314177 |
It would be nice if ASM told us. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is the Scala 2 equivalent of scala/scala3#19527, reported against Scala 3 by @adamw yesterday
the original report has some information about what kind of bytecode is involved — it’s
switch
on certain types, e.g. Javaenum
sScala 2 reproducer:
result:
The text was updated successfully, but these errors were encountered: