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

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:74fd506eeb15
1 // code in arrow function default arguments is strict if the body is strict
2
3 load(libdir + "asserts.js");
4
5 assertThrowsInstanceOf(
6 () => Function("(a = function (obj) { with (obj) f(); }) => { 'use strict'; }"),
7 SyntaxError);
8
9 assertThrowsInstanceOf(
10 () => Function("(a = obj => { with (obj) f(); }) => { 'use strict'; }"),
11 SyntaxError);

mercurial