Hi guys. The last literal of a instance-side compiled method always points to the SAME (#==) association of the class in Smalltalk global.
The literals of a compiled method that refer to class variables refer to the same association (#==) of the classPool of its class:

self assert: ((GRPlatform class >> #current) literalAt: 1) == (GRPlatform classPool associationAt: #Current).�� -> true

However, if I do a copy of the class:

| copy |
copy := GRPlatform copy.
self assert: ((copy class >> #current) literalAt: 1) == (copy classPool associationAt: #Current).

this is not true anymore. Of course, you can see this because of the Class >> #copy implementation:

So my question is....is #copy breaking the contract (and therefore it has to be fixed) or this is not mandatory for the system (as it is with the last literal pointing to classes)?

Thanks,

--
Mariano
http://marianopeck.wordpress.com