Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.20, 3.0.5, 2.5.13
-
None
-
Window 10, Groovy 3.05, Java 13.0.2 2020-01-14. Ran from GroovyConsole, but problem occurs when building from Gradle as well.
Description
The following code:
package com.my_example import groovy.transform.CompileStatic @CompileStatic class TestNegate { void xxx() { long yyy yyy = ~yyy } } def testNegate = new TestNegate()
Cause the following error in the compiler:
groovy.lang.GroovyRuntimeException: ASM reporting processing error for com.my_example.TestNegate#xxx with signature void xxx() in Script_ca3a8a63b69e01cd97876825de2f258e.groovy:8. Script_ca3a8a63b69e01cd97876825de2f258e.groovy
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: java.lang.NegativeArraySizeException: -1
at groovyjarjarasm.asm.Frame.merge(Frame.java:1222)
at groovyjarjarasm.asm.MethodWriter.computeAllFrames(MethodWriter.java:1610)
at groovyjarjarasm.asm.MethodWriter.visitMaxs(MethodWriter.java:1546)
... 3 more