13.1-31-s.js (775B)
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 any Identifier value occurs more than once within a FormalParameterList of a strict mode 8 FunctionDeclaration or FunctionExpression. 9 es5id: 13.1-31-s 10 description: > 11 Strict Mode - SyntaxError is thrown if a function is created using 12 a FunctionExpression that is contained in eval strict code and the 13 function has two identical parameters, which are separated by a 14 unique parameter name 15 flags: [noStrict] 16 ---*/ 17 18 19 assert.throws(SyntaxError, function() { 20 eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };"); 21 }); 22 23 reportCompare(0, 0);