[BUG] doWithIndex: problem in 3.0final

Claes-Fredrik Mannby cf at mannby.com
Sun Feb 25 03:49:08 UTC 2001


> On Sat, 24 Feb 2001 18:53:57 -0800 Claes-Fredrik Mannby <cf at mannby.com> wrote:
>> I had a class with a an instance variable named ØindexØ (very generic I know,
>> but in the context, it makes perfect sense), and in a method on that class I
>> was sending doWithIndex: [:eachMumble eachIndex | <snip> ] to an ordered
>> collection.
>> 
>> Trying to file this in, I got a syntax error (which wasnØt highlighted, BTW),
>> replacing eachIndex with text saying that ØindexØ is already used in the
>> class. Looking at SequenceableCollectionØs withIndexDo:, which gets called
>> eventually, it uses a block variable called index. Is this sort of ØinliningØ
>> to be expected?
> 
> Fred,
> 
> No it's not. Perhaps if you could create a change set with the class
> definition and the one method and append that to your email, a more helpful
> answer could be provided.
> 
> Cheers,
> Bob
> 
> 
Bob,

Basically, the following change set should have done it, but now I can't
reproduce it, even with my original change set. I noticed at one point that
I had lots of "Recompiling" progress indicators up, which may have put the
compiler in a bad state--that would be my best guess.

I also may have had parts of an older version of the ProcessBrowser loaded,
since it had slipped into my change set, but I doubt that that could affect
the compilation. There was also a duplicate class declaration later on in
the file, but filein hadn't gotten that far.

Sorry,

Fred

==============


'From Squeak3.0 of 4 February 2001 [latest update: #3545] on 24 February
2001 at 7:33:04 pm'!
Object subclass: #Test
    instanceVariableNames: 'index '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Bugs'!

!Test methodsFor: 'as yet unclassified' stamp: 'cf 2/24/2001 19:32'!
testIndex

    #(a b c) doWithIndex: [:eachElement :eachIndex | eachIndex]! !






More information about the Squeak-dev mailing list