[squeak-dev] Re: Multiple issues with class definition

Igor Stasenko siguctua at gmail.com
Fri Apr 10 16:42:22 UTC 2009


2009/4/10 Andreas Raab <andreas.raab at gmx.de>:
> Igor Stasenko wrote:
>>
>> Just two doits to reproduce the problem:
>>
>> Object subclass: #Blabla
>>        instanceVariableNames: ''
>>        classVariableNames: ''
>>        poolDictionaries: ''
>>        category: 'Whatever'.
>>
>> Object variableSubclass: #Blabla
>>        instanceVariableNames: ''
>>        classVariableNames: ''
>>        poolDictionaries: ''
>>        category: 'Whatever'.
>>
>> i wonder what the reason of preventing me to redefine a mistakenly
>> defined class, which having 0 methods? And even if i have the methods,
>> so what?
>
> This is a bug. I could track this to a change somewhere between Squeak 3.2
> and Squeak 3.6 (i.e., the bug is not in 3.2 but is in 3.6) where a
> consistence check was changed from #subclassesDo: to #withAllSubclassesDo:.
>
> The test now does a little more than it used to do but it also applies a
> check that should only be run between two *different* classes (i.e., the
> subclass and its superclass) to the *same* classes (the superclass and
> itself). To fix it, change
> ClassBuilder>>validateSubclass:canKeepLayoutFrom:forSubclassFormat: to have
> a line saying:
>
>        subclass == oldClass ifTrue:[^true]. "this ain't no subclass"
>
> Please file a mantis bug for this problem.
>
http://bugs.squeak.org/view.php?id=7332

>> Another funny thing that i found, that you can actually do:
>>
>> | string |
>> string := 'Blabla'.
>> Object subclass: string
>>        instanceVariableNames: ''
>>        classVariableNames: ''
>>        poolDictionaries: ''
>>        category: 'Whatever'.
>>
>> Smalltalk at: string " returns a class you just defined."
>
> Yeah, I'd say that's another bug. Somewhere there needs to be an #asSymbol
> in the middle.
or maybe 'self assert: name isSymbol' ?

> Can you file another bug for this?
>

http://bugs.squeak.org/view.php?id=7333

> Cheers,
>  - Andreas
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list