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
java.lang.VerifyError: (class: Child$$anonfun$mkInner$1, method: apply signature: (Ljava/lang/Object;)LParent$Inner;) Illegal use of nonvirtual function call
at Child.mkInner(verifyError.scala:6)
at Test$delayedInit$body.apply(verifyError.scala:2)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at Test$.main(verifyError.scala:1)
at Test.main(verifyError.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:71)
at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:139)
at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:71)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:139)
at scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:28)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:45)
at scala.tools.nsc.CommonRunner$class.runAndCatch(ObjectRunner.scala:35)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:45)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:105)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
The text was updated successfully, but these errors were encountered:
Alex Garthwaite (alextg) said:
FWIW we ran into this issue upgrading code from 2.9.3 to 2.10.4 at Twitter. The patch fixes the problem in Jason's pull request (as does simple code refactoring).
The result compiled fine but let to VerifyErrors when the class file was loaded. Contrary to what is listed above, this code compiled and ran fine with 2.9.3. It is only broken with 2.10.4. Diffing the bytecode that is generated, the 2.9.3 code uses a longer sequence using invokevirtual whereas the 2.10.4 code uses a very short invokespecial sequence.
Given that it appears this is a regression in behavior, does it make sense to apply the fix to 2.10.5?
p.s. The workaround I took was to lift the body of the second argument to the "out.in(str1) {...}" expression out as a separate def.
Reproduce code:
Expected result:
Compiles and runs fine
Actual result:
The text was updated successfully, but these errors were encountered: