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

VerifyError when @CompileStatic and negate boolean with !

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.5
    • 2.0.6
    • Static compilation
    • None

    Description

      In a CompileStatic block, when a boolean is negated with ! expression, I have the following error at runtime:

      Error:

      java.lang.VerifyError: 
      (class: fr/manu/impl/MaClass$_retournerItems_closure2, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object;) 
      Expecting to find integer on stack
      

      Groovy code:

      Class.groovy
      boolean b = true
      if (!b) {
      ...
      }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            mboillod Manuel Boillod
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: