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
Ammonite produces class files with missing InnerClasses attribute, leading to Class#getSimpleName crashing with java.lang.IncompatibleClassChangeError#1614
Open
smarter opened this issue
Feb 12, 2025
· 0 comments
This only happens with Scala 3, so it could be an issue in the Scala 3 compiler, but I haven't been able to reproduce it outside of ammonite, so it might be that ammonite is doing something weird, although looking at the code of ammonite I haven't been able to pinpoint what exactly:
Welcome to the AmmoniteRepl3.0.1 (Scala3.6.3Java21.0.6)
@classBar(); println((newBar()).getClass.getSimpleName)
java.lang.IncompatibleClassChangeError: ammonite.$sess.cmd0 and ammonite.$sess.cmd0$Bar disagree on InnerClasses attribute
java.lang.Class.getDeclaringClass0(NativeMethod)
java.lang.Class.isTopLevelClass(Class.java:1971)
java.lang.Class.getSimpleBinaryName(Class.java:1956)
java.lang.Class.getSimpleName0(Class.java:1793)
java.lang.Class.getSimpleName(Class.java:1784)
ammonite.$sess.cmd0$.<clinit>(cmd0.sc:1)
The text was updated successfully, but these errors were encountered:
This only happens with Scala 3, so it could be an issue in the Scala 3 compiler, but I haven't been able to reproduce it outside of ammonite, so it might be that ammonite is doing something weird, although looking at the code of ammonite I haven't been able to pinpoint what exactly:
The text was updated successfully, but these errors were encountered: