You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Walter van Iterson (JIRA)" <ji...@apache.org> on 2017/03/07 08:57:33 UTC

[jira] [Created] (GROOVY-8109) Unsupported operator with @CompileStatic causes BUG! () during compilation

Walter van Iterson created GROOVY-8109:
------------------------------------------

             Summary: Unsupported operator with @CompileStatic causes BUG! () during compilation
                 Key: GROOVY-8109
                 URL: https://issues.apache.org/jira/browse/GROOVY-8109
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.9
         Environment: GroovyConsole, Maven and IntelliJ (Windows 7)
            Reporter: Walter van Iterson
            Priority: Minor


When I compile the following code
{code:title=UnsupportedOperator.groovy|borderStyle=solid}
@groovy.transform.CompileStatic  
class UnsupportedOperator { 
  def x = 'a' !== 'b' 
} 
{code}
 
I get the following NullPointerException during compilation:
{noformat}
BUG! exception in phase 'instruction selection' in source unit 'ConsoleScript13' unexpected NullpointerException

Caused by: java.lang.NullPointerException
{noformat}

Without the @CompileStatic, I get the expected error message:
{noformat}
Caused by: org.codehaus.groovy.syntax.SyntaxException: Operator ("!==" at 3:17:  "!==" ) not supported @ line 3, column 17.
{noformat}

This might be similar to https://github.com/groovy/groovy-eclipse/issues/179



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)