Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.0-beta-2
-
None
Description
import groovy.transform.Memoized class Outer { private static class Inner { @Memoized static calc(int arg1, int arg2) { arg1 + arg2} } } println Outer.Inner.calc(3, 4)
Works with 2.4.12 but for 2.5+, results in:
groovy.lang.GroovyRuntimeException: NPE while processing ConsoleScript12 at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:286) ... Caused by: java.lang.NullPointerException at org.codehaus.groovy.classgen.asm.ClosureWriter.getClosureSharedVariables(ClosureWriter.java:360) at org.codehaus.groovy.classgen.asm.ClosureWriter.createClosureClass(ClosureWriter.java:194) at org.codehaus.groovy.classgen.asm.ClosureWriter.getOrAddClosureClass(ClosureWriter.java:156) ...
Attachments
Issue Links
- links to