2015-12-14 16:30 GMT+01:00 Richard Sargent <richard.sargent@gemtalksystems.com>:
Nicolai Hess-3 wrote
> Object := nil
>
> you can evaluate that piece of code, but afterwards ....
>
> Opal checks for assignments to read only variables (method arguments for
> example)
> and signals an error if you try to modify those vars.
> But it does not check globals.
>
> Should all Globals (OCLiteralVariable with isGlobalVar == true) be read
> only ?
> or can we distinguish global vars and class bindings?

I hope you will distinguish between class bindings and variable bindings (to
classes).

e.g. *StringClass :=String.* and *StringClass := Unicode.* should continue
to be usable.
(Assuming that classes named #String and #Unicode do exist, of course.)



Created a fobgubz entry:

18376 Do not allow assignments to global vars

��



--
View this message in context: http://forum.world.st/doing-stupid-things-image-will-become-unusable-tp4866090p4866994.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.