diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..2d3d86932f30a14c9e09a4a6ef255d71a5f5ac07 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,25 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { async function f() {}; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..9a4548aefd30edf76c99442dd6ad844b4d008177 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,25 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { async function* f() {}; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..7166809d0c2af3fc8660d409f88df8f97d4132ee --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,24 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { class f {};; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..9421881282b37d8318bcfea00c494a9df072a54a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,24 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { const f = 0;; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..36f267afd9f60d94260502f46b6e7e41a30277a9 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,24 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { function f() {}; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..171f77a727807e6f5f1dcb46c707f462ee9ceac7 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,25 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { function* f() {}; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..5abab8fe76dfa24340f60300505fcfa027577feb --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,24 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +function x() { + { let f;; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..02a8d0d73d5f2a603f8f64c013d5223b33485b3e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,18 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/fn-block-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with VariableDeclaration (VariableDeclaration in BlockStatement inside a function) +esid: sec-block-static-semantics-early-errors +flags: [generated] +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +---*/ + + +function x() { + { var f; var f; } +} diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..6c02c629dd7f63299c22ea58618970097ee2f062 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ async function f() {}; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..77b7cb8c08d5099a581f9fc83dcb89fc5140c073 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ async function* f() {}; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..1c0981466a07bac63fe16e7e3e12637ac81bf6ed --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-class-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ class f {};; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..eb18aff1aee1f5303ab864b55ae00a483fd1b4a9 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-const-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ const f = 0;; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..4420b7424d9a92e6bd6828880953c1c345851519 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-function-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ function f() {} { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..1b259081e63a46c9056893675094a527eaa88d8b --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-generator-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ function* f() {}; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..117707dcd431557490e950e7d85dbe9452b41566 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-let-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration-after.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ let f;; { var f; } } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..3317b383247fde55aee7d7cf74c8d40dc2b08940 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } async function f() {}; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..2b415d621cdc058f8bf773cc04306b6a738b0362 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } async function* f() {}; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..4228a9fb601d8a664109644460cca3016427656c --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } class f {};; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..75ccab9d66a22a6d499eb206d49da5ae24093e2e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } const f = 0;; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..66944239aaf250a7af958b672c395e95feff6d0b --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..e7d5a06bd66bd204cc20fac6d84659f42844571b --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } function* f() {}; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..6ca093c2b3dad3d57aad49301f9a9e9a961a2fd0 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. + +---*/ + + +$DONOTEVALUATE(); + +{ { var f; } let f;; } diff --git a/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..54f30facfdf1a2235bbc324b05eb861209cd823c --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/block-attempt-to-redeclare-inner-block-var-declaration.template +/*--- +description: redeclaration with VariableDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + + Static Semantics: VarDeclaredNames + + Block : { } + + 1. Return a new empty List. + + StatementList : StatementList StatementListItem + + 1. Let names be VarDeclaredNames of StatementList. + 2. Append to names the elements of the VarDeclaredNames of StatementListItem. + 3. Return names. + + StatementListItem : Declaration + + 1. Return a new empty List. +---*/ + + +{ { var f; } var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..18c2724200135742a4f61f3a1564bb8daff9666a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,23 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ async function f() {}; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..1a52d72b69142c5e7441a5d4e570c24e778c0963 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,23 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ async function* f() {}; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..39815f4cc98f69078899ac247006d113e8933673 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-class-declaration.js @@ -0,0 +1,22 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ class f {};; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..db02e9604b5fc8d29d0714d06fe8095ced5c9330 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-const-declaration.js @@ -0,0 +1,22 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ const f = 0;; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..2251147f296297b1de9bb05127aa3051fbac0299 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-function-declaration.js @@ -0,0 +1,22 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ function f() {}; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..0ef11aebe26aca049657574d2e9d6d879cf9c4b8 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-generator-declaration.js @@ -0,0 +1,23 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ function* f() {}; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000000000000000000000000000000000..21882bdbc20992d1d907d97ed62eca3f975ca0f1 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-let-declaration.js @@ -0,0 +1,22 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-var-declaration-after.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. + +---*/ + + +$DONOTEVALUATE(); + +{ let f;; var f; }