From 7a1eed0134891384d4b294df9a364a667de44df5 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Tue, 4 Dec 2018 18:29:41 -0500 Subject: [PATCH] Generate tests --- ...declare-with-async-function-declaration.js | 25 ++++++++++++ ...eclare-with-async-generator-declaration.js | 25 ++++++++++++ ...mpt-to-redeclare-with-class-declaration.js | 24 ++++++++++++ ...mpt-to-redeclare-with-const-declaration.js | 24 ++++++++++++ ...-to-redeclare-with-function-declaration.js | 24 ++++++++++++ ...to-redeclare-with-generator-declaration.js | 25 ++++++++++++ ...tempt-to-redeclare-with-let-declaration.js | 24 ++++++++++++ ...tempt-to-redeclare-with-var-declaration.js | 18 +++++++++ ...declare-with-async-function-declaration.js | 39 +++++++++++++++++++ ...eclare-with-async-generator-declaration.js | 39 +++++++++++++++++++ ...t-2-to-redeclare-with-class-declaration.js | 38 ++++++++++++++++++ ...t-2-to-redeclare-with-const-declaration.js | 38 ++++++++++++++++++ ...-to-redeclare-with-function-declaration.js | 38 ++++++++++++++++++ ...to-redeclare-with-generator-declaration.js | 39 +++++++++++++++++++ ...mpt-2-to-redeclare-with-let-declaration.js | 38 ++++++++++++++++++ ...declare-with-async-function-declaration.js | 39 +++++++++++++++++++ ...eclare-with-async-generator-declaration.js | 39 +++++++++++++++++++ ...mpt-to-redeclare-with-class-declaration.js | 38 ++++++++++++++++++ ...mpt-to-redeclare-with-const-declaration.js | 38 ++++++++++++++++++ ...-to-redeclare-with-function-declaration.js | 38 ++++++++++++++++++ ...to-redeclare-with-generator-declaration.js | 39 +++++++++++++++++++ ...tempt-to-redeclare-with-let-declaration.js | 38 ++++++++++++++++++ ...tempt-to-redeclare-with-var-declaration.js | 32 +++++++++++++++ ...declare-with-async-function-declaration.js | 23 +++++++++++ ...eclare-with-async-generator-declaration.js | 23 +++++++++++ ...t-2-to-redeclare-with-class-declaration.js | 22 +++++++++++ ...t-2-to-redeclare-with-const-declaration.js | 22 +++++++++++ ...-to-redeclare-with-function-declaration.js | 22 +++++++++++ ...to-redeclare-with-generator-declaration.js | 23 +++++++++++ ...mpt-2-to-redeclare-with-let-declaration.js | 22 +++++++++++ 30 files changed, 916 insertions(+) create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-class-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-const-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-let-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/fn-scope-var-declaration-attempt-to-redeclare-with-var-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-class-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-const-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-2-to-redeclare-with-let-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-async-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-class-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-const-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-let-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/inner-block-var-declaration-attempt-to-redeclare-with-var-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-async-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-class-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-const-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-function-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-generator-declaration.js create mode 100644 test/language/block-scope/syntax/redeclaration/var-declaration-attempt-2-to-redeclare-with-let-declaration.js 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 0000000000..2d3d86932f --- /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 0000000000..9a4548aefd --- /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 0000000000..7166809d0c --- /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 0000000000..9421881282 --- /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 0000000000..36f267afd9 --- /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 0000000000..171f77a727 --- /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 0000000000..5abab8fe76 --- /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 0000000000..02a8d0d73d --- /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 0000000000..6c02c629dd --- /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 0000000000..77b7cb8c08 --- /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 0000000000..1c0981466a --- /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 0000000000..eb18aff1ae --- /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 0000000000..4420b7424d --- /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 0000000000..1b259081e6 --- /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 0000000000..117707dcd4 --- /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 0000000000..3317b38324 --- /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 0000000000..2b415d621c --- /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 0000000000..4228a9fb60 --- /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 0000000000..75ccab9d66 --- /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 0000000000..66944239aa --- /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 0000000000..e7d5a06bd6 --- /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 0000000000..6ca093c2b3 --- /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 0000000000..54f30facfd --- /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 0000000000..18c2724200 --- /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 0000000000..1a52d72b69 --- /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 0000000000..39815f4cc9 --- /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 0000000000..db02e9604b --- /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 0000000000..2251147f29 --- /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 0000000000..0ef11aebe2 --- /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 0000000000..21882bdbc2 --- /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; }