Eric Milles created GROOVY-8457: ----------------------------------- Summary: Compiler error for @CompileStatic and @NotYetImplemented combination Key: GROOVY-8457 URL: https://issues.apache.org/jira/browse/GROOVY-8457 Project: Groovy Issue Type: Bug Components: Compiler Affects Versions: 2.4.13 Reporter: Eric Milles
The following test class snippet results in a groovy compiler error (included below). {code:groovy} import groovy.transform.CompileStatic import org.junit.Test @CompileStatic final class Tests { private def helper(String string, int number = 1) { } @Test @NotYetImplemented void testSomething() { helper('abc', 123) } } {code} {code} BUG! exception in phase 'class generation' in source unit 'C:\Users\U0076777\pde-workspaceg\eclipse-space\Groovy\src\test\BugTest.groovy' Error while popping argument from operand stack tracker in class Tests method void testSomething(). at org.codehaus.groovy.classgen.asm.OperandStack.popWithMessage(OperandStack.java:72) at org.codehaus.groovy.classgen.asm.OperandStack.remove(OperandStack.java:207) at org.codehaus.groovy.classgen.asm.StatementWriter.writeThrow(StatementWriter.java:572) at org.codehaus.groovy.classgen.AsmClassGenerator.visitThrowStatement(AsmClassGenerator.java:643) at org.codehaus.groovy.ast.stmt.ThrowStatement.visit(ThrowStatement.java:43) at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:85) at org.codehaus.groovy.classgen.asm.sc.StaticTypesStatementWriter.writeBlockStatement(StaticTypesStatementWriter.java:65) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:597) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:147) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:158) at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:461) at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:414) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:169) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:538) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1201) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:55) at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:260) at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:847) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1129) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:620) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:598) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:575) {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)