I entered a bug entry
        http://code.google.com/p/pharo/issues/detail?id=5566

Stef

On Mar 28, 2012, at 7:18 AM, Stéphane Ducasse wrote:

> Yes this is a bug probably due to the looked up of variable (bindingOf:)
> We should fix it for 1.4
> 
> Thanks.
> 
> Stef
> 
> On Mar 28, 2012, at 4:27 AM, Martin Sandiford wrote:
> 
>> On Wed, Mar 28, 2012 at 8:12 AM, Stéphane Ducasse
>> <[email protected]> wrote:
>>> thanks for the report. To me it looks like we changed some on classVar 
>>> lookup and it is not modular anymore…
>> 
>> I don't really know enough about the system to judge whether the
>> compiler is being over-conservative in this case.
>> 
>> A minimal case to reproduce the same error is:
>> 
>> Smalltalk at: #Foo put: #Foo.
>> 
>> Then define a class:
>> 
>> Object subclass: #FooTest
>>      instanceVariableNames: ''
>>      classVariableNames: 'Foo'     "This is the trigger"
>>      poolDictionaries: ''
>>      category: 'ClassVar-Testing'
>> 
>> On save, a debug window with "DuplicatedVariableError: Foo is defined
>> elsewhere" is shown.
>> 
>> I've tried this with a selection of images in the 1.4 set from
>> 14400-14414 and with 1.3 13315 with the same results.  It seems that
>> Class>>declare: calls Class>>bindingOf: to check if a symbol is
>> already bound, and this always returns non-nil for globals.
>> 
>> Martin
>> 
> 
> 


Reply via email to