[Vm-dev] Bug in #instVarAt:put: for read-only objects

Norbert Hartl norbert at hartl.name
Fri Jan 5 12:42:19 UTC 2018


If I do 

(#foo -> #bar)
	beReadOnlyObject;
	value: #baz

it throws

ModificationForbidden:  #foo->#bar is read-only, hence its field 2 cannot be modified with #baz

 which is as expected. But if I do

(#foo -> #bar)
	beReadOnlyObject;
	instVarNamed: #value put: #baz

I get

PrimitiveFailed: primitive #instVarAt:put: in Association failed

I think this a bug, no?

Norbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180105/c38e332c/attachment.html>


More information about the Vm-dev mailing list