You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My initial suspicious culprit is here, where the comment very helpfully explains what is going on: the loop body is being rewritten to move the variable assignment out of the loop body. This works for single assignments but results in a miscompilation for multiple assignments (I'm not sure why).
Just removing that seems to fix this but that seems obviously wrong so I'm going to keep digging as to why this causes the miscompilation.
Stupid test code:
Gives off a
ReferenceError: "x" is not defined.
.Note that this works fine in regular Rhino:
Note that it works fine outside of a loop body:
Gives
[23:42:03] [INFO ] server_scripts:test.js:2: 1.0
.The text was updated successfully, but these errors were encountered: