mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Merge pull request #1023 from anba/redeclaration
Lexical redeclarations in block- and switch-statements Background feedback from @anba: In https://tc39.github.io/ecma262/#sec-switch-statement-static-semantics-lexicallydeclarednames, all lexically declared names from the different case clauses are combined. For each case clause, the LexicallyDeclaredNames definition from https://tc39.github.io/ecma262/#sec-block-static-semantics-lexicallydeclarednames applies, which has: ``` StatementListItem : Declaration 1. Return the BoundNames of Declaration. ``` And in https://tc39.github.io/ecma262/#prod-Declaration we've got: ``` Declaration[Yield, Await] : HoistableDeclaration[?Yield, ?Await, ~Default] ``` And in https://tc39.github.io/ecma262/#prod-HoistableDeclaration: ``` HoistableDeclaration[Yield, Await, Default] : FunctionDeclaration[?Yield, ?Await, ?Default] ``` And the BoundNames of a FunctionDeclaration is its BindingIdentifier https://tc39.github.io/ecma262/#sec-function-definitions-static-semantics-boundnames. And there's also B3.3.5 (https://tc39.github.io/ecma262/#sec-switch-duplicates-allowed-static-semantics) which allows duplicate FunctionDeclarations in sloppy mode in switch-statements.
This commit is contained in:
commit
9481020e91
@ -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 }*/ }
|
@ -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() {} }
|
|
||||||
|
|
@ -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; }
|
|
@ -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; }
|
|
@ -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; }
|
|
||||||
|
|
@ -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() {} }
|
|
||||||
|
|
@ -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() {} }
|
@ -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() {} }
|
@ -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 {}; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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 {}; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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 {}; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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 {}; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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 {}; }
|
@ -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; }
|
@ -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() {} }
|
@ -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() {} }
|
@ -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; }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user