Details
Description
When assembling the Grails project, I do obtain the following stacktrace:
java.lang.ArrayIndexOutOfBoundsException: size==0
at org.codehaus.groovy.classgen.asm.OperandStack.ensureStackNotEmpty(OperandStack.java:279)
at org.codehaus.groovy.classgen.asm.OperandStack.replace(OperandStack.java:271)
at org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression(AsmClassGenerator.java:815)
at org.codehaus.groovy.ast.expr.CastExpression.visit(CastExpression.java:90)
at org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:615)
[. . .]
Tell me if you need a more complete stacktrace. I try to work around this bug, changing the AST, without success. The error looks the same each time.
To reproduce:
$ tar xvfz testcase-asttransform-ko.tar.gz
$ cd groovyInfra
$ ./gradlew publishMavenPublicationToMavenLocal
$ cd ..
$ cd t620g
$ ./gradlew assemble
=> BROKEN HERE
Thanks for your help !