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

IncompatibleClassChangeError when accessing an undefined variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-JSR-2
    • class generator
    • None

    Description

      running

      class C {
      static main(args)

      { println a }

      }

      gives

      Exception in thread "main" java.lang.IncompatibleClassChangeError
      at org.codehaus.groovy.runtime.InvokerHelper.getGroovyObjectProperty(InvokerHelper.java:197)
      at C.main(test.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.groovy.runtime.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:63)
      at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:996)
      at groovy.lang.MetaClass.invokeStaticMethod(MetaClass.java:365)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:124)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:106)
      at groovy.lang.GroovyShell.run(GroovyShell.java:222)
      at groovy.lang.GroovyShell.main(GroovyShell.java:92)

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              tug John Wilson
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: