Debian Codegraph @

js/src/tests/test262/language/statements/function/13.1-27-s.js

raw
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-27-s
10 description: >
11 Strict Mode - SyntaxError is thrown if a function is created using
12 a FunctionDeclaration that is contained in eval strict code and
13 the function has three identical parameters
14 flags: [noStrict]
15 ---*/
16
17
18 assert.throws(SyntaxError, function() {
19 eval("'use strict'; function _13_1_27_fun(param, param, param) { }");
20 });
21
22 reportCompare(0, 0);