Debian Codegraph @

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

raw
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.1;
8 It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
9 of a strict mode FunctionDeclaration or FunctionExpression.
10 es5id: 13.1-2-s
11 description: >
12 Strict Mode - SyntaxError is thrown if the identifier 'eval'
13 appears within a FormalParameterList of a strict mode
14 FunctionExpression
15 flags: [onlyStrict]
16 ---*/
17
18 assert.throws(SyntaxError, function() {
19 eval("var _13_1_2_fun = function (eval) { }");
20 });
21
22 reportCompare(0, 0);