Ah, of course. I understand now. Setting to an integer has disastrous consequences for the vm. That must be prevented.

Possibly by coincidence Jaromir brought up the issue on squeak-dev, suggesting

 
        sender := aContextOrNil ifNotNil: [aContextOrNil asContext]```

which I think is good.  I would validate by sending asContext in the relevant places.  If necessary we can introduce something only understood by Context and not by BlockClosure, eg raiseErrorIfNotContext, which I suppose could be implemented in Object to raise an error.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/654/1251223035@github.com>