OK, this sounds like an education/learning the tricks problem then :)

On 21 nov. 2009, at 17:37, Adrian Lienhard wrote:

> Why would you want to call #basicAt:?
>
> As the comment in Object>>basicAt: says, this works only for indexable
> objects, and Interval is not indexable. So this looks like the
> expected behavior to me.
>
> Cheers,
> Adrian
>
> On Nov 21, 2009, at 21:32 , Simon Denier wrote:
>
>> Try the following (1)
>> (1 to: 10) at: 2
>> returns 2
>>
>> then (2)
>> (1 to: 10) basicAt: 2
>> raises an exception
>>
>> It is surprising.
>>
>> Problem is that Interval redefines at:
>> but in (2), the lookup retrieves Object>>basicAt: which only works  
>> for
>> indexable objects (which an interval is not).
>>
>>
>> So Interval should also redefine basicAt: ?
>>
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [email protected]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
  Simon




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to