[Cuis-dev] Behavior of #superclass: message
Facundo Javier Gelatti
javiergelatti at gmail.com
Thu Nov 27 12:42:23 PST 2025
Hi!
I've noticed that the #superclass: message does not affect the superclass
of the (meta)class of the receiver. For example:
Object subclass: #A instanceVariableNames: '' classVariableNames: ''
poolDictionaries: ''.
Object subclass: #B instanceVariableNames: '' classVariableNames: ''
poolDictionaries: ''.
B superclass. " => Object "
B class superclass. " => Object class "
B superclass: A.
B superclass. " => A "
B class superclass. " => Object class (not A class)"
The Class>>#superclass: method has a comment that says "Not to be used
lightly!", so I'm not sure if this is in fact the expected behavior (but at
least I was surprised by it).
Cheers!
Facu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251127/34aaed46/attachment.htm>
More information about the Cuis-dev
mailing list