LinqLover / SimulationStudio

A growing suite of applications and tools using code simulation in Squeak/Smalltalk
9 stars 1 forks source link

Nested sandboxes fail at simCustomizationLevel >= 3 #17

Open LinqLover opened 3 years ago

LinqLover commented 3 years ago

Minimal example:

Sandbox evaluate: [Sandbox evaluate: [Sandbox evaluate: [6 * 7]]].

Expected result: 42.
Actual result: Error: Improper store into indexable object

The error is caused by the simulation of a failing primitive which is not possible at the moment because the primitiveFailToken is simulation-intransparent. This needs to be addressed and redesigned in Trunk. See: [squeak-dev] Re: Two new curious Context/primitive questions :-)

LinqLover commented 2 years ago

By the way: When writing regression tests, also create a regression test for

[Simulator evaluate: [Error signal]] on: Error do: [#foo].
LinqLover commented 2 years ago

Here is a third one (not yet working):

(Context runSimulated: [self error]) on: Error do: [].