13.1-22-s.js (723B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 Refer 13.1; 7 It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList 8 of a strict mode FunctionDeclaration or FunctionExpression. 9 es5id: 13.1-22-s 10 description: > 11 StrictMode - SyntaxError is thrown if the identifier 'arguments' 12 appears within a FormalParameterList of a strict mode 13 FunctionExpression when FuctionBody is strict code 14 flags: [noStrict] 15 ---*/ 16 17 18 assert.throws(SyntaxError, function() { 19 eval("var _13_1_22_fun = function (arguments) { 'use strict'; }"); 20 }); 21 22 reportCompare(0, 0);