strict-fn-decl-nested-1.js (482B)
1 // |reftest| error:SyntaxError 2 // Copyright (c) 2012 Ecma International. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 es5id: 12.10.1-2-s 7 description: > 8 with statement in strict mode throws SyntaxError (nested function where 9 container is strict) 10 negative: 11 phase: parse 12 type: SyntaxError 13 flags: [noStrict] 14 ---*/ 15 16 $DONOTEVALUATE(); 17 18 function foo() { 19 'use strict'; 20 function f() { 21 var o = {}; 22 with (o) {}; 23 } 24 }