Groovy
  1. Groovy
  2. GROOVY-2925

ExpandoMetaClass sometimes, but sometimes MetaClassImpl

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.6-beta-1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The type of a new instance of a class depends on whether the metaClass property on its class has been accessed before. That is just not right.

      groovy> class A {}
      groovy> println A.metaClass
      groovy> def a = new A ()
      groovy> println a.metaClass
      groovy> println A.metaClass

      groovy.lang.ExpandoMetaClass@b05c54[class A]
      groovy.lang.ExpandoMetaClass@b05c54[class A]
      groovy.lang.ExpandoMetaClass@b05c54[class A]
      groovy> class A {}
      groovy> //println A.metaClass
      groovy> def a = new A ()
      groovy> println a.metaClass
      groovy> println A.metaClass

      groovy.lang.MetaClassImpl@a7eb57[class A]
      groovy.lang.ExpandoMetaClass@2e22ed[class A]

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Robert Fischer
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development