Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8109

Unsupported operator with @CompileStatic causes BUG! () during compilation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.9
    • 2.4.10
    • Compiler
    • None
    • GroovyConsole (2.4.8), Maven (2.4.9) and IntelliJ, All in Windows 7

    Description

      When I compile the following code

      UnsupportedOperator.groovy
      @groovy.transform.CompileStatic  
      class UnsupportedOperator { 
        def x = 'a' !== 'b' 
      } 
      

      I get the following NullPointerException during compilation:

      BUG! exception in phase 'instruction selection' in source unit 'ConsoleScript13' unexpected NullpointerException
      
      Caused by: java.lang.NullPointerException
      

      Without the @CompileStatic, I get the expected error message:

      Caused by: org.codehaus.groovy.syntax.SyntaxException: Operator ("!==" at 3:17:  "!==" ) not supported @ line 3, column 17.
      

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

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              wviterson Walter van Iterson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: