source-academy / js-slang

Implementations of sublanguages of JavaScript, TypeScript, Scheme and Python
https://source-academy.github.io/source/
Apache License 2.0
66 stars 104 forks source link

Stepper: ReferenceError is not shown, instead it get stuck #1587

Closed hanscau closed 6 months ago

hanscau commented 6 months ago

image

Stuck, instead it should show the error:

image

martin-henz commented 6 months ago
"cannot access 'x' before initialization

That's the correct error message for when the stepper wants to evaluate a name: Genuinely undeclared names are handled by the validator.

So basically, evaluation should get stuck, but the error should be displayed as above.