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

VerifyError when doing strange things with closures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.6-rc-1
    • bytecode
    • None

    Description

      The following Groovy script:

      use (Foo) {
      new File("temp").eachLine { line ->
      tripSpecs*.

      { bar[it] += 1 }

      }
      }

      With the file Foo.java:

      public class Foo { }

      Produces a verify error:

      $ groovy bug.groovy
      Caught: java.lang.VerifyError: (class: bug$_run_closure1, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object Incompatible argument to function
      at bug.run(bug.groovy:1)
      at bug.main(bug.groovy)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            mcspanky Martin C. Martin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: