Debian Codegraph @

js/src/tests/test262/language/statements/try/catch-parameter-boundnames-restriction-eval-eval-throws-strict.js

raw
1 'use strict';
2 // Copyright (c) 2017 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-strict-mode-of-ecmascript
7 description: >
8 It is a SyntaxError if a CatchParameter occurs within strict mode code and BoundNames of CatchParameter contains either eval or arguments (13.15.1).
9 flags: [onlyStrict]
10 ---*/
11
12 assert.throws(SyntaxError, function() {
13 eval("try {} catch (eval) { }");
14 });
15
16 reportCompare(0, 0);