summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug646968-4.js
blob: fdcafbb2b13a4001f5dba33c9c51cd663b0c2ddd (plain)
1
2
3
4
5
6
7
8
9
10
load(libdir + "asserts.js");

// Scoping: `x` in the head of a `for (let x...)` loop refers to the loop variable.

assertThrowsInstanceOf(function () {
var s = "", x = {a: 1, b: 2, c: 3};
for (let x in eval('x'))
    s += x;
assertEq(s, "");
}, ReferenceError);