summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/try/catch-parameter-boundnames-restriction-arguments-eval-throws-strict.js
blob: 816ae2e2f7c20ba187e1099618fa17d0d8ac76fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';
// Copyright (c) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-strict-mode-of-ecmascript
description: >
    It is a SyntaxError if a CatchParameter occurs within strict mode code and BoundNames of CatchParameter contains either eval or arguments (13.15.1).
flags: [onlyStrict]
---*/

assert.throws(SyntaxError, function() {
  eval("try {} catch (arguments) { }");
});

reportCompare(0, 0);