1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/arrow-functions/strict-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +// arrow functions are not implicitly strict-mode code 1.5 + 1.6 +load(libdir + "asserts.js"); 1.7 + 1.8 +var f = a => { with (a) return f(); }; 1.9 +assertEq(f({f: () => 7}), 7); 1.10 + 1.11 +f = a => function () { with (a) return f(); }; 1.12 +assertEq(f({f: () => 7})(), 7); 1.13 + 1.14 +f = (a = {x: 1, x: 2}) => b => { "use strict"; return a.x; }; 1.15 +assertEq(f()(0), 2); 1.16 +