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

VerifyError on += of instance variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-beta-5
    • class generator
    • None

    Description

      class MyClass
      {
      count = 0;

      doit()

      { count += 1; }

      }

      o = new MyClass();
      println "instantiated"
      o.doit();
      println o.count;

      -----------
      results in:
      -----------

      Exception in thread "main" java.lang.VerifyError: (class: MyClass, method: doit signature: ()Ljava/lang/Object Unable to pop operand off an empty stack
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at test2.class$(test2.gr)
      at test2.run(test2.gr:14)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:56)
      at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:977)
      at groovy.lang.MetaClass.invokeMethod(MetaClass.java:285)
      at groovy.lang.MetaClass.invokeMethod(MetaClass.java:262)
      at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:73)

      ...

      Attachments

        Activity

          People

            jstrachan James Strachan
            cpoirier Chris Poirier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: