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

        Robert Fischer created issue -
        Jochen Theodorou made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Assignee Jochen Theodorou [ blackdrag ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12731942 ] Default workflow, editable Closed status [ 12743120 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969387 ] Default workflow, editable Closed status [ 12977161 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development