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

VerifyError for CompileStatic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.3.5
    • None
    • None
    • None
    • Groovy Console (appspot)

    Description

      This is happening in my code and I was able to pull it out and run it on the groovyconsole.appspot.com and get the same error:

      @groovy.transform.CompileStatic
      def doit() {
      String whoops = "one,TWO, , three"
      whoops.tokenize(',')*.trim().findAll(

      {String tok -> return tok.size()>0}

      )*.toLowerCase()
      }

      doit()​​​

      it returns
      java.lang.VerifyError: (class: Script1, method: doit signature: ()Ljava/lang/Object Inconsistent stack height 3 != 2

      It appears to be the last *.toLowerCase() - if I turn that into a collect, its all happy.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rvowles Richard Vowles
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: