[squeak-dev] The Inbox: Kernel-ct.1405.mcz

Christoph Thiede christoph.thiede at student.hpi.uni-potsdam.de
Sat May 15 14:06:01 UTC 2021


The #defaultResumeValue was actually a commit slip and should not have been
included in this version.

Nevertheless, this raises another question - what would you expect from this
example to return?

a := [true ifTrue: [^ 1] yourself].
"Both statements need to be executed separately in a Workspace so that [a
outerContext sender] becomes nil!"
[a value] on: BlockCannotReturn do: [:ex | ex resume].

Should it be 1 or nil? In the Trunk, is it nil, if we override
#defaultResumeValue as below, it will be 1.

(Note that I appended #yourself to the block to prevent inlined compilation
- when inlined, the snippet always returns nil because the optimization does
not assume that the methodReturn could be skipped ...)

Best,
Christoph



-----
Carpe Squeak!
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list