[squeak-dev] Shadowing "reserved" variables

Stéphane Rollandin lecteur at zogotounga.net
Thu Jul 18 14:33:32 UTC 2019


>> You can currently evaluate the following:
>>
>> [ :self :thisContext |
>> 	| nil super true false |
>> 	nil := 1.
>> 	super := 2.
>> 	true := 3.
>> 	false := 4.
>> 	self + thisContext = (nil + super + true + false) ] value: 4 value: 6
>>
>> Is this the expected behavior or should we disallow such oddities?
> 
> I think I'd quite like to see that prevented.

Indeed.

Stef


More information about the Squeak-dev mailing list