diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..4a06bf44b8 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +{ async function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..5327ac0fbe --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +{ async function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..0fd13ee658 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ class f {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..0c9d092a8e --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ const f = 0; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..bf954a75e7 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +{ function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..f991d228a8 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..592556b0f9 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ let f; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..50f548934e --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ var f; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..57a185a7cc --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +switch (0) { case 1: async function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..6d67152339 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +switch (0) { case 1: async function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..0e8888e4b8 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: class f {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..9829abbf68 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: const f = 0; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..7ad3eede2a --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +switch (0) { case 1: function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..5fb499613f --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..f11a6dc158 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: let f; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..dd83e6bcd2 --- /dev/null +++ b/src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: var f; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..2349e07a3d --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +{ async function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..ed2adc2d6c --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +{ async function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..4cadafbd71 --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ class f {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..711fdf4225 --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ const f = 0; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..9e8ee15f50 --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..f4a49b40c1 --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..57f5bebe99 --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ let f; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..cdb73b1e4a --- /dev/null +++ b/src/declarations/redeclare-allow-var/block-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,15 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +---*/ + +{ var f; /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..6317cd26f0 --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +switch (0) { case 1: async function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..7b8c6b0b92 --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +switch (0) { case 1: async function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..2462d78ede --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: class f {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..8361a53a78 --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: const f = 0; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..12da4af5c2 --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..029076ae5b --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..18fb61d17e --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: let f; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..462c5647c0 --- /dev/null +++ b/src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,15 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +---*/ + +switch (0) { case 1: var f; default: /*{ body }*/ } diff --git a/src/declarations/redeclare-with-async-function-declaration.case b/src/declarations/redeclare-with-async-function-declaration.case new file mode 100644 index 0000000000..cf74b701d3 --- /dev/null +++ b/src/declarations/redeclare-with-async-function-declaration.case @@ -0,0 +1,12 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with AsyncFunctionDeclaration +template: redeclare +flags: [async-functions] +---*/ + +//- body + async function f() {} diff --git a/src/declarations/redeclare-with-async-generator-declaration.case b/src/declarations/redeclare-with-async-generator-declaration.case new file mode 100644 index 0000000000..7f2638d2a1 --- /dev/null +++ b/src/declarations/redeclare-with-async-generator-declaration.case @@ -0,0 +1,12 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with AsyncGeneratorDeclaration +template: redeclare +flags: [async-iteration] +---*/ + +//- body + async function* f() {} diff --git a/src/declarations/redeclare-with-class-declaration.case b/src/declarations/redeclare-with-class-declaration.case new file mode 100644 index 0000000000..96d73ad4fe --- /dev/null +++ b/src/declarations/redeclare-with-class-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with ClassDeclaration +template: redeclare +---*/ + +//- body + class f {}; diff --git a/src/declarations/redeclare-with-const-declaration.case b/src/declarations/redeclare-with-const-declaration.case new file mode 100644 index 0000000000..0ca9e32c84 --- /dev/null +++ b/src/declarations/redeclare-with-const-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with const-LexicalDeclaration +template: redeclare +---*/ + +//- body + const f = 0; diff --git a/src/declarations/redeclare-with-function-declaration.case b/src/declarations/redeclare-with-function-declaration.case new file mode 100644 index 0000000000..2924d17d9d --- /dev/null +++ b/src/declarations/redeclare-with-function-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with FunctionDeclaration +template: redeclare-allow-sloppy-function +---*/ + +//- body + function f() {} diff --git a/src/declarations/redeclare-with-generator-declaration.case b/src/declarations/redeclare-with-generator-declaration.case new file mode 100644 index 0000000000..91b8398bc7 --- /dev/null +++ b/src/declarations/redeclare-with-generator-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with GeneratorDeclaration +template: redeclare +---*/ + +//- body + function* f() {} diff --git a/src/declarations/redeclare-with-let-declaration.case b/src/declarations/redeclare-with-let-declaration.case new file mode 100644 index 0000000000..f20d89ec39 --- /dev/null +++ b/src/declarations/redeclare-with-let-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with let-LexicalDeclaration +template: redeclare +---*/ + +//- body + let f; diff --git a/src/declarations/redeclare-with-var-declaration.case b/src/declarations/redeclare-with-var-declaration.case new file mode 100644 index 0000000000..e4c493e805 --- /dev/null +++ b/src/declarations/redeclare-with-var-declaration.case @@ -0,0 +1,11 @@ +// Copyright (C) André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: > + redeclaration with VariableDeclaration +template: redeclare-allow-var +---*/ + +//- body + var f; diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..4a06bf44b8 --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +{ async function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..5327ac0fbe --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +{ async function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..0fd13ee658 --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ class f {} /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..0c9d092a8e --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ const f = 0; /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..f163125379 --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ function f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..f991d228a8 --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ function* f() {} /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..592556b0f9 --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +{ let f; /*{ body }*/ } diff --git a/src/declarations/redeclare/block-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare/block-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..50f548934e --- /dev/null +++ b/src/declarations/redeclare/block-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/block-scope/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in BlockStatement +esid: sec-block-static-semantics-early-errors +info: | + Block : { StatementList } + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + StatementList also occurs in the VarDeclaredNames of StatementList. +negative: + phase: early + type: SyntaxError +---*/ + +{ var f; /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template new file mode 100644 index 0000000000..57a185a7cc --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to- +name: AsyncFunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-functions] +---*/ + +switch (0) { case 1: async function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template new file mode 100644 index 0000000000..6d67152339 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to- +name: AsyncGeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +flags: [async-iteration] +---*/ + +switch (0) { case 1: async function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template new file mode 100644 index 0000000000..0e8888e4b8 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/class-declaration-attempt-to- +name: ClassDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: class f {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template new file mode 100644 index 0000000000..9829abbf68 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/const-declaration-attempt-to- +name: LexicalDeclaration (const) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: const f = 0; default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template new file mode 100644 index 0000000000..25e21f00b0 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/function-declaration-attempt-to- +name: FunctionDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: function f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template new file mode 100644 index 0000000000..5fb499613f --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to- +name: GeneratorDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: function* f() {} default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template new file mode 100644 index 0000000000..f11a6dc158 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/let-declaration-attempt-to- +name: LexicalDeclaration (let) in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: let f; default: /*{ body }*/ } diff --git a/src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template b/src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template new file mode 100644 index 0000000000..dd83e6bcd2 --- /dev/null +++ b/src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +path: language/statements/switch/syntax/redeclaration/var-declaration-attempt-to- +name: VariableDeclaration in SwitchStatement +esid: sec-switch-statement-static-semantics-early-errors +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +negative: + phase: early + type: SyntaxError +---*/ + +switch (0) { case 1: var f; default: /*{ body }*/ } diff --git a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js deleted file mode 100644 index adedef2b9d..0000000000 --- a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2011 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: B.3.3 -description: > - redeclaration within block: - attempt to redeclare function declaration with function declaration -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ -{ function f() {} function f() {} } - diff --git a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-let.js b/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-let.js deleted file mode 100644 index e8b8a57bde..0000000000 --- a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-let.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2011 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: B.3.3 -description: > - redeclaration within block: - attempt to redeclare function declaration with let -negative: - phase: early - type: SyntaxError ----*/ -{ function f() {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-var.js b/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-var.js deleted file mode 100644 index c64bc6fc3f..0000000000 --- a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-var.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2011 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: B.3.3 -description: > - redeclaration within block: - attempt to redeclare function declaration with var -negative: - phase: early - type: SyntaxError ----*/ -{ function f() {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-binding-with-let.js b/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-binding-with-let.js deleted file mode 100644 index 017f9340ea..0000000000 --- a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-binding-with-let.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2011 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: B.3.3 -description: > - redeclaration within block: - attempt to redeclare var binding with let -negative: - phase: early - type: SyntaxError ----*/ -{ var f; let f; } - diff --git a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-with-function-declaration.js deleted file mode 100644 index 51a846665e..0000000000 --- a/test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-var-with-function-declaration.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2011 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: B.3.3 -description: > - redeclaration within block: - attempt to redeclare var with function declaration -negative: - phase: early - type: SyntaxError ----*/ -{ var f; function f() {} } - diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..f1d547e5ad --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..ea7c3c8128 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..296bf68b7c --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..36cbd2b572 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..16acb98834 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-async-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..1d2dc084f4 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..0a899d9774 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function f() {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..89207f0fe9 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-async-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncFunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + 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. + +---*/ + + +{ async function f() {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..0cb38e9f4f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..22c3af1516 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..299c29bd15 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..3f07ac962a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..32778ac34f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-async-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..060340e32b --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..9bbce7c0be --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ async function* f() {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..a880768b97 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-async-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncGeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + 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. + +---*/ + + +{ async function* f() {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..7d337ec3df --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..ed6b21f5dd --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..2753e39f0e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with ClassDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..c82e019f2b --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..5ce7fa4616 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-class-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..22facfffe8 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..0501e28dfc --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ class f {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..3cf5ae8a0f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-class-declaration.template +/*--- +description: redeclaration with VariableDeclaration (ClassDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ class f {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..80916f174e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..442369d00d --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..0956febb6e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..3dfbfdd73d --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..90a560a09e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-const-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..43302cbc06 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..97655890a7 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ const f = 0; let f; } diff --git a/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..e66c4a4a86 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-const-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (const) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ const f = 0; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..c3645fd8b4 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..b63a1f49f3 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..4fceee1775 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..9516f5e15e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..a99bc5daa5 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, onlyStrict] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..00a7c2762a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..b5c0405e53 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function f() {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..a38c8d3a8e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (FunctionDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ function f() {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..6b59160faf --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..6bdc4f036f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..b2da379236 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..3e64cc495e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..54804914de --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..9d27152186 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..33bb30afa3 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ function* f() {} let f; } diff --git a/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..18aa5f072a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (GeneratorDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ function* f() {} var f; } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..1b1212fcd1 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..004d28d69c --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..96f81fd596 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..e51134231c --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..1d57c24f6f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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-let-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..a4d64bb251 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..11bd26d34f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/block-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains + any duplicate entries. + +---*/ + + +{ let f; let f; } diff --git a/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..f3f87f691f --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// 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-let-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (let) in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ let f; var f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..48812a526a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + 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. + +---*/ + + +{ var f; async function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..eb729a4fc7 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + 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. + +---*/ + + +{ var f; async function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..bf5254217e --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ var f; class f {}; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..fe598eaa7d --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ var f; const f = 0; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..d9c3eb1ae6 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ var f; function f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..33021a0a88 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ var f; function* f() {} } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..55cec72f8a --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// 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.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in BlockStatement) +esid: sec-block-static-semantics-early-errors +flags: [generated] +negative: + phase: early + 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. + +---*/ + + +{ var f; let f; } diff --git a/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..9212e34414 --- /dev/null +++ b/test/language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,16 @@ +// 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-var-declaration.template +/*--- +description: redeclaration with VariableDeclaration (VariableDeclaration in 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. +---*/ + + +{ var f; var f; } diff --git a/test/language/expressions/async-generator/named-yield-star-async-next.js b/test/language/expressions/async-generator/named-yield-star-async-next.js index cfc868fee7..d76a7c9919 100644 --- a/test/language/expressions/async-generator/named-yield-star-async-next.js +++ b/test/language/expressions/async-generator/named-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/named-yield-star-async-return.js b/test/language/expressions/async-generator/named-yield-star-async-return.js index d2c9393625..ed0eb45fd7 100644 --- a/test/language/expressions/async-generator/named-yield-star-async-return.js +++ b/test/language/expressions/async-generator/named-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/named-yield-star-async-throw.js b/test/language/expressions/async-generator/named-yield-star-async-throw.js index fed558ba95..daf94ad5ba 100644 --- a/test/language/expressions/async-generator/named-yield-star-async-throw.js +++ b/test/language/expressions/async-generator/named-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/named-yield-star-sync-next.js b/test/language/expressions/async-generator/named-yield-star-sync-next.js index 277dfc962d..1151a333a2 100644 --- a/test/language/expressions/async-generator/named-yield-star-sync-next.js +++ b/test/language/expressions/async-generator/named-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/named-yield-star-sync-return.js b/test/language/expressions/async-generator/named-yield-star-sync-return.js index 890d88e675..f16d91f788 100644 --- a/test/language/expressions/async-generator/named-yield-star-sync-return.js +++ b/test/language/expressions/async-generator/named-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/named-yield-star-sync-throw.js b/test/language/expressions/async-generator/named-yield-star-sync-throw.js index 65c6c29d1a..3d66a7059c 100644 --- a/test/language/expressions/async-generator/named-yield-star-sync-throw.js +++ b/test/language/expressions/async-generator/named-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Named async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-async-next.js b/test/language/expressions/async-generator/yield-star-async-next.js index 66490aae9d..24bebf06ab 100644 --- a/test/language/expressions/async-generator/yield-star-async-next.js +++ b/test/language/expressions/async-generator/yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-async-return.js b/test/language/expressions/async-generator/yield-star-async-return.js index c30ad77770..f5abcc8559 100644 --- a/test/language/expressions/async-generator/yield-star-async-return.js +++ b/test/language/expressions/async-generator/yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-async-throw.js b/test/language/expressions/async-generator/yield-star-async-throw.js index 0f28369c7d..ee2bec69ad 100644 --- a/test/language/expressions/async-generator/yield-star-async-throw.js +++ b/test/language/expressions/async-generator/yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-sync-next.js b/test/language/expressions/async-generator/yield-star-sync-next.js index dc6d2e637b..243f6d4f1c 100644 --- a/test/language/expressions/async-generator/yield-star-sync-next.js +++ b/test/language/expressions/async-generator/yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-sync-return.js b/test/language/expressions/async-generator/yield-star-sync-return.js index 9e5a3cf92c..fd13df0711 100644 --- a/test/language/expressions/async-generator/yield-star-sync-return.js +++ b/test/language/expressions/async-generator/yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/async-generator/yield-star-sync-throw.js b/test/language/expressions/async-generator/yield-star-sync-throw.js index aaafd376e3..9152899663 100644 --- a/test/language/expressions/async-generator/yield-star-sync-throw.js +++ b/test/language/expressions/async-generator/yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Unnamed async generator expression) esid: prod-AsyncGeneratorExpression -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-async-next.js b/test/language/expressions/class/async-gen-method-static-yield-star-async-next.js index ee99eba470..3909b1e2b0 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-async-next.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-async-return.js b/test/language/expressions/class/async-gen-method-static-yield-star-async-return.js index 3cf99ce337..e4ec21d501 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-async-return.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-async-throw.js b/test/language/expressions/class/async-gen-method-static-yield-star-async-throw.js index a61d9dbe99..e3b7fda5ef 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-async-throw.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-sync-next.js b/test/language/expressions/class/async-gen-method-static-yield-star-sync-next.js index 0bd18e9d25..e95b2d6e08 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-sync-next.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-sync-return.js b/test/language/expressions/class/async-gen-method-static-yield-star-sync-return.js index 194a905477..919665f040 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-sync-return.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-static-yield-star-sync-throw.js b/test/language/expressions/class/async-gen-method-static-yield-star-sync-throw.js index ff2ffb9394..dfbdb03183 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-star-sync-throw.js +++ b/test/language/expressions/class/async-gen-method-static-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Static async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-async-next.js b/test/language/expressions/class/async-gen-method-yield-star-async-next.js index 58c027c35d..1d984bc243 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-async-next.js +++ b/test/language/expressions/class/async-gen-method-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-async-return.js b/test/language/expressions/class/async-gen-method-yield-star-async-return.js index 2b6f87f409..846da9ba03 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-async-return.js +++ b/test/language/expressions/class/async-gen-method-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-async-throw.js b/test/language/expressions/class/async-gen-method-yield-star-async-throw.js index fa554577fa..817c3911f8 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-async-throw.js +++ b/test/language/expressions/class/async-gen-method-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-sync-next.js b/test/language/expressions/class/async-gen-method-yield-star-sync-next.js index c92b516d94..4145e3e7b1 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-sync-next.js +++ b/test/language/expressions/class/async-gen-method-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-sync-return.js b/test/language/expressions/class/async-gen-method-yield-star-sync-return.js index fa9dcb2cc1..b4468f67b3 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-sync-return.js +++ b/test/language/expressions/class/async-gen-method-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/class/async-gen-method-yield-star-sync-throw.js b/test/language/expressions/class/async-gen-method-yield-star-sync-throw.js index cbfe52bf02..6911f9dd7b 100644 --- a/test/language/expressions/class/async-gen-method-yield-star-sync-throw.js +++ b/test/language/expressions/class/async-gen-method-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Async generator method as a ClassExpression element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | ClassElement : diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-async-next.js b/test/language/expressions/object/method-definition/async-gen-yield-star-async-next.js index 99d8a55016..f138a4c492 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-async-next.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-async-return.js b/test/language/expressions/object/method-definition/async-gen-yield-star-async-return.js index cfcdd57e25..aca4235c99 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-async-return.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-async-throw.js b/test/language/expressions/object/method-definition/async-gen-yield-star-async-throw.js index 31e0305268..d424e36464 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-async-throw.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-next.js b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-next.js index bfe40e16ca..c8d0a9b088 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-next.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-return.js b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-return.js index 8575cf8ce8..0a8af70b5d 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-return.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-throw.js b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-throw.js index 2f9038b54e..9846710008 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-star-sync-throw.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Async generator method) esid: prod-AsyncGeneratorMethod -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-async-next.js b/test/language/statements/async-generator/yield-star-async-next.js index bd1b879a9f..d7dfdb45f2 100644 --- a/test/language/statements/async-generator/yield-star-async-next.js +++ b/test/language/statements/async-generator/yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-async-return.js b/test/language/statements/async-generator/yield-star-async-return.js index a84c37d0ef..12bd49dc30 100644 --- a/test/language/statements/async-generator/yield-star-async-return.js +++ b/test/language/statements/async-generator/yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-async-throw.js b/test/language/statements/async-generator/yield-star-async-throw.js index 69bdd02551..c057eb762f 100644 --- a/test/language/statements/async-generator/yield-star-async-throw.js +++ b/test/language/statements/async-generator/yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-sync-next.js b/test/language/statements/async-generator/yield-star-sync-next.js index d9652b476d..078120dc85 100644 --- a/test/language/statements/async-generator/yield-star-sync-next.js +++ b/test/language/statements/async-generator/yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-sync-return.js b/test/language/statements/async-generator/yield-star-sync-return.js index 013a3d0b66..8af1218e48 100644 --- a/test/language/statements/async-generator/yield-star-sync-return.js +++ b/test/language/statements/async-generator/yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/async-generator/yield-star-sync-throw.js b/test/language/statements/async-generator/yield-star-sync-throw.js index 7e343e745c..1e30ad2aab 100644 --- a/test/language/statements/async-generator/yield-star-sync-throw.js +++ b/test/language/statements/async-generator/yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Async generator Function declaration) esid: prod-AsyncGeneratorDeclaration -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | Async Generator Function Definitions diff --git a/test/language/statements/class/async-gen-method-static-yield-star-async-next.js b/test/language/statements/class/async-gen-method-static-yield-star-async-next.js index 3660090579..f3540662e3 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-async-next.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-static-yield-star-async-return.js b/test/language/statements/class/async-gen-method-static-yield-star-async-return.js index acea008434..f7638829f0 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-async-return.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-static-yield-star-async-throw.js b/test/language/statements/class/async-gen-method-static-yield-star-async-throw.js index d166d73f0a..4e9204b31c 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-async-throw.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-static-yield-star-sync-next.js b/test/language/statements/class/async-gen-method-static-yield-star-sync-next.js index 46de363772..57ffc489cc 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-sync-next.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-static-yield-star-sync-return.js b/test/language/statements/class/async-gen-method-static-yield-star-sync-return.js index ee5e953502..ba3787bf94 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-sync-return.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-static-yield-star-sync-throw.js b/test/language/statements/class/async-gen-method-static-yield-star-sync-throw.js index 6fbc8d0e9e..521a8b0fe5 100644 --- a/test/language/statements/class/async-gen-method-static-yield-star-sync-throw.js +++ b/test/language/statements/class/async-gen-method-static-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Static async generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-async-next.js b/test/language/statements/class/async-gen-method-yield-star-async-next.js index c4d2f248d9..b057946887 100644 --- a/test/language/statements/class/async-gen-method-yield-star-async-next.js +++ b/test/language/statements/class/async-gen-method-yield-star-async-next.js @@ -4,7 +4,7 @@ /*--- description: Execution order for yield* with async iterator and next() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-async-return.js b/test/language/statements/class/async-gen-method-yield-star-async-return.js index cd2066d225..1033780fa0 100644 --- a/test/language/statements/class/async-gen-method-yield-star-async-return.js +++ b/test/language/statements/class/async-gen-method-yield-star-async-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and return() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-async-throw.js b/test/language/statements/class/async-gen-method-yield-star-async-throw.js index 767d635125..c0c4ab52a4 100644 --- a/test/language/statements/class/async-gen-method-yield-star-async-throw.js +++ b/test/language/statements/class/async-gen-method-yield-star-async-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with async iterator and throw() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-sync-next.js b/test/language/statements/class/async-gen-method-yield-star-sync-next.js index 88998e86f5..b3fb062387 100644 --- a/test/language/statements/class/async-gen-method-yield-star-sync-next.js +++ b/test/language/statements/class/async-gen-method-yield-star-sync-next.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and next() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-sync-return.js b/test/language/statements/class/async-gen-method-yield-star-sync-return.js index 278d79a931..8312c90429 100644 --- a/test/language/statements/class/async-gen-method-yield-star-sync-return.js +++ b/test/language/statements/class/async-gen-method-yield-star-sync-return.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and return() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, Symbol.asyncIterator, async-iteration] +features: [async-iteration, Symbol.asyncIterator] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/class/async-gen-method-yield-star-sync-throw.js b/test/language/statements/class/async-gen-method-yield-star-sync-throw.js index 28e612637f..206bf8cff9 100644 --- a/test/language/statements/class/async-gen-method-yield-star-sync-throw.js +++ b/test/language/statements/class/async-gen-method-yield-star-sync-throw.js @@ -4,7 +4,7 @@ /*--- description: execution order for yield* with sync iterator and throw() (Async Generator method as a ClassDeclaration element) esid: prod-AsyncGeneratorMethod -features: [async-iteration, async-iteration] +features: [async-iteration] flags: [generated, async] info: | ClassElement : diff --git a/test/language/statements/switch/early-lex-dup.js b/test/language/statements/switch/early-lex-dup.js deleted file mode 100644 index c9896a5275..0000000000 --- a/test/language/statements/switch/early-lex-dup.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-switch-statement-static-semantics-early-errors -es6id: 13.12.1 -description: Syntax error from duplicate lexical variables -info: > - It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any - duplicate entries. -negative: - phase: early - type: SyntaxError -features: [let, const] ----*/ - -switch (0) { - case 1: - let test262id; - break; - default: - const test262id = null; -} diff --git a/test/language/statements/switch/early-lex-var-collision.js b/test/language/statements/switch/early-lex-var-collision.js deleted file mode 100644 index 9150eb4984..0000000000 --- a/test/language/statements/switch/early-lex-var-collision.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-switch-statement-static-semantics-early-errors -es6id: 13.12.1 -description: > - Syntax error from collisions between lexical variables and var-declarared - variables -info: > - It is a Syntax Error if any element of the LexicallyDeclaredNames of - CaseClauses also occurs in the VarDeclaredNames of CaseClauses. -negative: - phase: early - type: SyntaxError -features: [let] ----*/ - -switch (0) { - case 1: - var test262id; - break; - default: - let test262id; -} diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..925721bc62 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..a8ba0c3cba --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..705b73b39f --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..86a5c61d85 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..536b33b9b2 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..36b9537a0f --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..6b6aebc827 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function f() {} default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..72adb23472 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: async function f() {} default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..e61ab5dae9 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..6a753df176 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..e4b0e6344d --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..3bb4ed815f --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..472a5cf419 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..d44f10a55d --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..984e79277b --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: async function* f() {} default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..49f295fd16 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: async function* f() {} default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..83b14957bc --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..dbe4bba05b --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..586439280a --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with ClassDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..c5bed4db86 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..b22fa4cb55 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..73429dcb5b --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..91cbf1155a --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: class f {} default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..782633bfa6 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with VariableDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: class f {} default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..f899664677 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..fd2be697bc --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..f6c6921084 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..5ce5951efb --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..b86028e3b2 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..f49c692510 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..1521beceaa --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: const f = 0; default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..790f43babf --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: const f = 0; default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..60c4472bc4 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..a9d1efb8fb --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..7692f47762 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..c819a107b0 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..67f4e2075f --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, onlyStrict] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..366aae248a --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..11ea759d82 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function f() {} default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..1529898bb4 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: function f() {} default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..55dd66bb17 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..76d27113c1 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..354f8a0b8d --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..aaccccedcf --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..7cf44429b2 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..98b9d6e433 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..925179673c --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: function* f() {} default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..fb77dad9f0 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: function* f() {} default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..09a651f66c --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..8ed604d6c9 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..c27f27072b --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..0a57ef2e79 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..0c030922a8 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..3f2c1d5cfc --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..550a45a7ad --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +switch (0) { case 1: let f; default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..16eb3a51e6 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: let f; default: var f; } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js new file mode 100644 index 0000000000..4cf2322efe --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-function-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-functions] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: async function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js new file mode 100644 index 0000000000..ac1c7f60f7 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-async-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, async-iteration] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: async function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js new file mode 100644 index 0000000000..c15e7f4b8d --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-class-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: class f {}; } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js new file mode 100644 index 0000000000..0006d68216 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-const-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: const f = 0; } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js new file mode 100644 index 0000000000..18dc080488 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-function-declaration.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: function f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js new file mode 100644 index 0000000000..bff4e03fca --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-generator-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: function* f() {} } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js new file mode 100644 index 0000000000..78091ab6b4 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js @@ -0,0 +1,20 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-let-declaration.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +switch (0) { case 1: var f; default: let f; } diff --git a/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js new file mode 100644 index 0000000000..7fa10706a3 --- /dev/null +++ b/test/language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-var-declaration.js @@ -0,0 +1,16 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/redeclare-with-var-declaration.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with VariableDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +---*/ + + +switch (0) { case 1: var f; default: var f; } diff --git a/tools/generation/lib/template.py b/tools/generation/lib/template.py index 53bd03ba19..14cc3caebe 100644 --- a/tools/generation/lib/template.py +++ b/tools/generation/lib/template.py @@ -3,6 +3,7 @@ import os, re import codecs, yaml +from collections import OrderedDict from util.find_comments import find_comments from util.parse_yaml import parse_yaml @@ -151,23 +152,33 @@ class Template: features = [] features += case_values['meta'].get('features', []) features += self.attribs['meta'].get('features', []) + features = list(OrderedDict.fromkeys(features)) if len(features): lines += ['features: ' + yaml.dump(features).strip()] flags = ['generated'] flags += case_values['meta'].get('flags', []) flags += self.attribs['meta'].get('flags', []) + flags = list(OrderedDict.fromkeys(flags)) lines += ['flags: ' + yaml.dump(flags).strip()] includes = [] includes += case_values['meta'].get('includes', []) includes += self.attribs['meta'].get('includes', []) + includes = list(OrderedDict.fromkeys(includes)) if len(includes): lines += ['includes: ' + yaml.dump(includes).strip()] if case_values['meta'].get('negative'): + if self.attribs['meta'].get('negative'): + raise Exception('Cannot specify negative in case and template file') + negative = case_values['meta'].get('negative') + else: + negative = self.attribs['meta'].get('negative') + + if negative: lines += ['negative:'] - as_yaml = yaml.dump(case_values['meta'].get('negative'), + as_yaml = yaml.dump(negative, default_flow_style=False) lines += indent(as_yaml.strip(), ' ').split('\n')