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

@CompileStatic compiles 0 != null to false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.6
    • Component/s: Static compilation
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: