Debian Codegraph @

js/src/tests/test262/language/statements/function/param-duplicated-strict-2-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // Copyright (c) 2012 Ecma International. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5
6 /*---
7 info: |
8 Refer 13.1;
9 It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
10 FunctionDeclaration or FunctionExpression.
11 es5id: 13.1-6-s
12 description: >
13 Strict Mode - SyntaxError is thrown if a function is created in
14 'strict mode' using a FunctionDeclaration and the function has two
15 identical parameters, which are separated by a unique parameter
16 name
17 negative:
18 phase: parse
19 type: SyntaxError
20 flags: [onlyStrict]
21 ---*/
22
23 $DONOTEVALUATE();
24
25 function _13_1_6_fun(param1, param2, param1) { }