diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/arrow-functions/strict-2.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arrow-functions/strict-2.js b/js/src/jit-test/tests/arrow-functions/strict-2.js new file mode 100644 index 0000000000..150b2ddb0e --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/strict-2.js @@ -0,0 +1,11 @@ +// code in arrow function default arguments is strict if arrow is strict + +load(libdir + "asserts.js"); + +assertThrowsInstanceOf( + () => Function("'use strict'; (a = function (obj) { with (obj) f(); }) => { }"), + SyntaxError); + +assertThrowsInstanceOf( + () => Function("'use strict'; (a = obj => { with (obj) f(); }) => { }"), + SyntaxError); |