source-academy/js-slang

Stepper: Incorrect evaluation sequence in Program

Closed this issue · 0 comments

From the specs:

  1. The first value is kept if the following statements are reducible.
  2. The first value is reduced if the second statement is also a value.
image

However, the current implementation does not mirror this behaviour

image

(Notice how "1;" is being evaluated even though it is a value and the second statement is a constant declaration and thus is reducible)