Debian Codegraph @

js/src/tests/test262/language/statements/try/early-catch-function.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2018 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-try-statement-static-semantics-early-errors
7 description: >
8 Redeclaration of CatchParameter with directly nested FunctionDeclaration in function context.
9 info: |
10 13.15.1 Static Semantics: Early Errors
11
12 It is a Syntax Error if any element of the BoundNames of CatchParameter also
13 occurs in the LexicallyDeclaredNames of Block.
14 negative:
15 phase: parse
16 type: SyntaxError
17 ---*/
18
19 $DONOTEVALUATE();
20
21 function f() {
22 try {
23 } catch (e) {
24 function e(){}
25 }
26 }