Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.9, 2.0.8, 2.1.9, 2.2.1
-
JDK 8 M8 b127
Description
I've created a simple repro here: https://bitbucket.org/marshallpierce/java8-groovy-verifyerror
The README has full details; I'll copy a trimmed version here.
It looks like every available groovy version (1.8.9, 2.0.8, 2.1.9, 2.2.1) all have issues with generating bytecode for classes that extend interfaces that have default method implementations (new in Java 8).
Under Java 7, `./gradlew clean build` succeeds. Under Java 8, it fails with a VerifyError:
java.lang.VerifyError: (class: org/mpierce/groovy/GroovySetSubclass, method: super$1$parallelStream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:259) at org.mpierce.groovy.GroovySetSubclassTest.class$(GroovySetSubclassTest.groovy) at org.mpierce.groovy.GroovySetSubclassTest.$get$$class$org$mpierce$groovy$GroovySetSubclass(GroovySetSubclassTest.groovy) at org.mpierce.groovy.GroovySetSubclassTest.testGroovySubclass(GroovySetSubclassTest.groovy:9)
GroovySetSubclass is a trivial subclass of HashSet. Java analogs are