1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/arrow-functions/strict-2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,11 @@ 1.4 +// code in arrow function default arguments is strict if the body is strict 1.5 + 1.6 +load(libdir + "asserts.js"); 1.7 + 1.8 +assertThrowsInstanceOf( 1.9 + () => Function("(a = function (obj) { with (obj) f(); }) => { 'use strict'; }"), 1.10 + SyntaxError); 1.11 + 1.12 +assertThrowsInstanceOf( 1.13 + () => Function("(a = obj => { with (obj) f(); }) => { 'use strict'; }"), 1.14 + SyntaxError);