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