13.0-8-s-strict.js (661B)
1 'use strict'; 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 info: | 7 Refer 13; 8 The production FunctionBody : SourceElementsopt is evaluated as follows: 9 es5id: 13.0-8-s 10 description: > 11 Strict Mode - SourceElements is evaluated as strict mode code when 12 the code of this FunctionExpression is contained in non-strict 13 mode but the call to eval is a direct call in strict mode code 14 flags: [onlyStrict] 15 ---*/ 16 17 assert.throws(SyntaxError, function() { 18 eval("var _13_0_8_fun = function () {eval = 42;};"); 19 _13_0_8_fun(); 20 }); 21 22 reportCompare(0, 0);