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
The scala compiler happily generates class files with more than 254 method arguments, which will cause a java.lang.ClassFormatError as soon as a JVM loads the class file:
java.lang.ClassFormatError:Too many arguments in method signature in classfileFoo$
at java.lang.ClassLoader.defineClass1(NativeMethod)
at java.lang.ClassLoader.defineClass(ClassLoader.java:787)
at scala.tools.nsc.util.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredMethods0(NativeMethod)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.privateGetPublicMethods(Class.java:2571)
at java.lang.Class.getMethods(Class.java:1429)
java.lang.ClassFormatError:Too many arguments in method signature in classfileBar
at java.lang.ClassLoader.defineClass1(NativeMethod)
at java.lang.ClassLoader.defineClass(ClassLoader.java:787)
at scala.tools.nsc.util.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Both examples should be rejected by the compiler.
The text was updated successfully, but these errors were encountered:
The scala compiler happily generates class files with more than 254 method arguments, which will cause a java.lang.ClassFormatError as soon as a JVM loads the class file:
Both examples should be rejected by the compiler.
The text was updated successfully, but these errors were encountered: