summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/LexicalEnvironment/var-in-catch-body-annex-b-eval-for-of.js
blob: 901f5c0f7f8c67091dc5c28896d3d90988bf8bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// |reftest| skip-if(!xulRuntime.shell)

assertThrowsInstanceOf(() => evaluate(`
    try { throw null; } catch (e) { eval("for (var e of []) {}") }
`), SyntaxError);

assertThrowsInstanceOf(new Function(`
    try { throw null; } catch (e) { eval("for (var e of []) {}") }
`), SyntaxError);

if (typeof reportCompare === "function")
    reportCompare(true, true);