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

@CompileStatic compiles 0 != null to false

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.5
    • 2.4.6
    • Static compilation
    • None

    Description

      import groovy.transform.*;

      // @CompileStatic
      class Bug {
      void exec()

      { println 0 != null }

      }

      new Bug().exec()

      ​The above code prints "true". But when @CompileStatic is umcommented, it prints "false".

      Attachments

        Activity

          People

            pascalschumacher Pascal Schumacher
            kgdev Kevin Gu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: