pharo icon indicating copy to clipboard operation
pharo copied to clipboard

OldClassDefinitionBuilder does not manage import of classes with nil as superclass

Open jecisc opened this issue 7 months ago • 2 comments

Because it is filed out as two statements and not one.

For example:

ProtoObject subclass: #C4
	instanceVariableNames: ''
	classVariableNames: ''
	package: 'Generated-Trait-Test-Package'.
C4 superclass: nil

jecisc avatar Nov 10 '23 14:11 jecisc

Originally, in ST80 this was:

nil subclass: #C4
	instanceVariableNames: ''
	classVariableNames: ''
	package: 'Generated-Trait-Test-Package'.

This means that UndefinedObject would have to implement all the many, many methods... if we want to support nil subclasses for all possibilities.

ST80 just implemented the one needed for Object (later ProptoObject), there was no way to create e.g. a variable subclass of nil.

Setting the nil in a second expression means one can do all kinds of subclasses of nil and remove the API.

But it makes actually dealing with this class def very complex, as it is now completely not uniform anymore.

MarcusDenker avatar Nov 10 '23 14:11 MarcusDenker

Do we care of old definition?

Ducasse avatar Nov 12 '23 21:11 Ducasse