summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/strict-2.js
blob: 150b2ddb0ecd6c3f9f63c91f28c768d5e637c28f (plain)
1
2
3
4
5
6
7
8
9
10
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);