[ 
https://issues.apache.org/jira/browse/GROOVY-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Theodorou resolved GROOVY-5404.
--------------------------------------
    Fix Version/s: 1.8.8
                       (was: 4.x)
         Assignee: Jochen Theodorou
       Resolution: Fixed

I am closing the issue because the bug behind got fixed and the message is now 
different as well

> Compiler exception for invalid operator
> ---------------------------------------
>
>                 Key: GROOVY-5404
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5404
>             Project: Groovy
>          Issue Type: Improvement
>          Components: class generator
>    Affects Versions: 1.8.6
>            Reporter: Jan Stette
>            Assignee: Jochen Theodorou
>            Priority: Minor
>             Fix For: 1.8.8
>
>
> A script containing this:
> print "Foo" ===~ ".*"
> ...causes the stack trace below from the compiler.  It's not valid code of 
> course, but the compiler should give a normal error message to the user.
> Stack trace:
> >>> a serious error occurred: BUG! exception in phase 'class generation' in 
> >>> source unit '<...>Foo.groovy' Operation: ("===" at 2:13:  "===" ) not 
> >>> supported
> >>> stacktrace:
> BUG! exception in phase 'class generation' in source unit 
> '/Users/jans/src/courses/nlp-class/week4/pa4-ner/java/GroovyTest.groovy' 
> Operation: ("===" at 2:13:  "===" ) not supported
>       at 
> org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.eval(BinaryExpressionHelper.java:246)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitBinaryExpression(AsmClassGenerator.java:521)
>       at 
> org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49)
>       at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:301)
>       at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:187)
>       at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:89)
>       at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:73)
>       at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:292)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:657)
>       at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75)
>       at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:577)
>       at 
> org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeReturn(OptimizingStatementWriter.java:316)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:499)
>       at 
> org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
>       at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:80)
>       at 
> org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:449)
>       at 
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:313)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:270)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:390)
>       at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:174)
>       at 
> org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:767)
>       at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:967)
>       at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:546)
>       at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:524)
>       at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:501)
>       at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:480)
>       at 
> org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:60)
>       at 
> org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:216)
>       at 
> org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompile(FileSystemCompiler.java:149)
>       at 
> org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompileWithErrorHandling(FileSystemCompiler.java:179)
>       at 
> org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:163)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108)
>       at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to