1 When compiling a for-loop local variable initializer expression, the compiler 2 incorrectly treated subsequent declarations as global variable assignments, 3 triggering reference error exceptions in strict mode. 4 5 -- Expect stdout -- 6 1 7 -- End -- 8 9 -- Testcase -- 10 {% 11 "use strict"; 12 13 // The initializer expression below was incorrectly interpreted as 14 // `let x = 0; y = 1` instead of the correct `let ..., y = 1`. 15 for (let x = 0, y = 1; x < 1; x++) 16 print(y, "\n"); 17 %} 18 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt