mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 17:04:31 +02:00
Add templates for lexical redeclarations in block- and switch-statements
This commit is contained in:
parent
dd1f55a3dc
commit
2763c3b178
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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() {}
|
@ -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() {}
|
11
src/declarations/redeclare-with-class-declaration.case
Normal file
11
src/declarations/redeclare-with-class-declaration.case
Normal file
@ -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 {};
|
11
src/declarations/redeclare-with-const-declaration.case
Normal file
11
src/declarations/redeclare-with-const-declaration.case
Normal file
@ -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;
|
11
src/declarations/redeclare-with-function-declaration.case
Normal file
11
src/declarations/redeclare-with-function-declaration.case
Normal file
@ -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() {}
|
11
src/declarations/redeclare-with-generator-declaration.case
Normal file
11
src/declarations/redeclare-with-generator-declaration.case
Normal file
@ -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() {}
|
11
src/declarations/redeclare-with-let-declaration.case
Normal file
11
src/declarations/redeclare-with-let-declaration.case
Normal file
@ -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;
|
11
src/declarations/redeclare-with-var-declaration.case
Normal file
11
src/declarations/redeclare-with-var-declaration.case
Normal file
@ -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;
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
@ -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 }*/ }
|
Loading…
x
Reference in New Issue
Block a user