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

IncompatibleClassChangeError when using closures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.1
    • 2.3.2, 2.2.3
    • Compiler
    • None
    • JVM: 1.7.0_13, Mac OS X 10.8.5 (12F45)

    Description

      99 /tmp> ~/Downloads/groovy-2.1.2/bin/groovy q
      Here's the problem?!?
      -- nope was actually OK
      100 /tmp> ~/Downloads/groovy-2.2.1/bin/groovy q
      Here's the problem?!?
      -- nope was actually OK
      101 /tmp> ~/Downloads/groovy-2.3.1/bin/groovy q
      Here's the problem?!?
      Caught: java.lang.IncompatibleClassChangeError
      java.lang.IncompatibleClassChangeError
              at Foo$_bar_closure1.doCall(q.groovy:10)
              at Foo$_bar_closure1.doCall(q.groovy)
              at Foo.justcallme(q.groovy:3)
              at Foo$justcallme$0.callStatic(Unknown Source)
              at Foo.bar(q.groovy:8)
              at Foo$bar.call(Unknown Source)
              at q.run(q.groovy:15)
      102 /tmp> <q.groovy
      class Foo {
          static justcallme(Closure block) {
              block()
          }
          static foo() {
          }
          static void bar(Closure block) {
              this.justcallme {
      println "Here's the problem?!?"
                  this.foo()
      println "-- nope was actually OK"
              }
          }
      }
      Foo.bar() { }
      103 /tmp> groovy -v
      Groovy Version: 2.3.1 JVM: 1.7.0_13 Vendor: Oracle Corporation OS: Mac OS X
      104 /tmp> sw_vers
      ProductName:    Mac OS X
      ProductVersion: 10.8.5
      BuildVersion:   12F45
      105 /tmp>
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            oc OC
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: