Closed DiligentPenguinn closed 9 months ago
This seems to be the culprit. The env instruction only gets pushed when there is a statement node in the control stack, which is not the case here.
Removing said check (control.some(isNode)
) solves the issue.
@martin-henz is it safe to just remove the check? Why is it in here anyway? Am I missing something?
Also this issue is probably related to #1506
While working on #1503 , I encountered a very weird bug https://share.sourceacademy.nus.edu.sg/m9578 The result of the program should be undefined but instead it throws an error: "Redeclaring name b"