Debian Codegraph @

js/src/jit-test/tests/arrow-functions/strict-2.js

raw
1 // code in arrow function default arguments is strict if arrow is strict
2
3 load(libdir + "asserts.js");
4
5 assertThrowsInstanceOf(
6 () => Function("'use strict'; (a = function (obj) { with (obj) f(); }) => { }"),
7 SyntaxError);
8
9 assertThrowsInstanceOf(
10 () => Function("'use strict'; (a = obj => { with (obj) f(); }) => { }"),
11 SyntaxError);