In modern Squeak image, literals are protected by immutability flag, and the primitive correctly check for immutability of receiver and fails. The example is thus not reproducible anymore in Squeak.

We also fail to reproduce if we use asSymbol rather than a literal:

| s | s := 'TEST123' asSymbol.
s translateToLowercase.
s -> (Symbol findInterned: s)

because Symbol>>intern: is also protecting the symbol by sending beReadOnlyObject.

The fact that the Symbol is not interned: is not a VM problem, it's an implementation detail at image side.
I thus suggest to close this issue which is now correctly guarded at image side.

Cuis might still suffer from the problem, but let me suggest that Cuis do the right thing and protect Symbols from mutation too.

Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/561/>