[BUG] ProtoObject class

Johan Fabry johan.fabry at vub.ac.be
Thu Jul 6 12:37:56 UTC 2000


Hi,

I found a bug regarding the 'class' message:

'class' is defined in Object (as a primitive). However, subclasses of
ProtoObject (which are not subclasses of Object), e.g. ObjectOut, still
understand it. Try this: 'ObjectOut new class' It should raise a
MessageNotUnderstood, but it doesn't, it nicely reports that the class
is ObjectOut.

Also, if you define a 'class' method in a PrimitiveObject subclass (e.g.
'self halt.'), this code will not be executed, you will still get the
class of the receiver.

I was wondering, since I have never messed around with primitives, can I
safely copy-paste the contents of the definition of 'class' into
ProtoObject and then remove the definition from Object? (Have not tried
it yet, just wondering if this will generate random crashes or some
other ugly/unpredictable behaviour)
--
"You are more than the sum       Johan Fabry - Johan.Fabry at vub.ac.be
 of what you consume.            Vrije Universiteit Brussel
 Desire is not an occupation."   Programming Technology Lab, Room 10F709
  -- KMFDM                       Pleinlaan 2, 1050 Brussels, Belgium





More information about the Squeak-dev mailing list