name-eval-strict-body.js (475B)
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: 13.1-36-s 7 description: > 8 StrictMode - SyntaxError is thrown if 'eval' occurs as the 9 function name of a FunctionDeclaration whose FunctionBody is in 10 strict mode 11 negative: 12 phase: parse 13 type: SyntaxError 14 flags: [noStrict] 15 ---*/ 16 17 $DONOTEVALUATE(); 18 19 function eval() { 'use strict'; }