[BUG] in 3.6g when subclassing String from an existing class

Ned Konz ned at bike-nomad.com
Wed Sep 17 16:34:34 UTC 2003


On Wednesday 17 September 2003 09:02 am, Michaël Piel wrote:

> There is a bug in the 3.6 gamma image when you try to redefine an
> existing class by setting its superclass to String. For example you
> create a new class which subclass Object : Object subclass:
> #MyClass
> 	instanceVariableNames: ''
> 	classVariableNames: ''
> 	poolDictionaries: ''
> 	category: 'MyStuff'
> Then if you try to change Object with String you get an error
> message : "Error : MyClass cannot be recompiled". I don't know if
> this happens with another classes than String, but there is no
> error in a 3.4 image.

Well, String is a different kind of class: it is a 
variableByteSubclass of ArrayedCollection. It looks as if we added 
logic in April to check for and prevent just this kind of format 
change.

Perhaps, though, in cases where there are no existing instances it 
would be OK to make the change. I don't know what you'd do later when 
you tried to read an old one in from disk, though.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list