From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../language/statements/switch/syntax/browser.js | 0 ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ ...nction-name-redeclaration-attempt-with-class.js | 24 ++++++++++++++++++++++ ...nction-name-redeclaration-attempt-with-const.js | 24 ++++++++++++++++++++++ ...ion-name-redeclaration-attempt-with-function.js | 24 ++++++++++++++++++++++ ...on-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ ...function-name-redeclaration-attempt-with-let.js | 24 ++++++++++++++++++++++ ...function-name-redeclaration-attempt-with-var.js | 24 ++++++++++++++++++++++ ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ ...erator-name-redeclaration-attempt-with-class.js | 24 ++++++++++++++++++++++ ...erator-name-redeclaration-attempt-with-const.js | 24 ++++++++++++++++++++++ ...tor-name-redeclaration-attempt-with-function.js | 24 ++++++++++++++++++++++ ...or-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ ...enerator-name-redeclaration-attempt-with-let.js | 24 ++++++++++++++++++++++ ...enerator-name-redeclaration-attempt-with-var.js | 24 ++++++++++++++++++++++ .../switch/syntax/redeclaration/browser.js | 0 ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ .../class-name-redeclaration-attempt-with-class.js | 23 +++++++++++++++++++++ .../class-name-redeclaration-attempt-with-const.js | 23 +++++++++++++++++++++ ...ass-name-redeclaration-attempt-with-function.js | 23 +++++++++++++++++++++ ...ss-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ .../class-name-redeclaration-attempt-with-let.js | 23 +++++++++++++++++++++ .../class-name-redeclaration-attempt-with-var.js | 23 +++++++++++++++++++++ ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ .../const-name-redeclaration-attempt-with-class.js | 23 +++++++++++++++++++++ .../const-name-redeclaration-attempt-with-const.js | 23 +++++++++++++++++++++ ...nst-name-redeclaration-attempt-with-function.js | 23 +++++++++++++++++++++ ...st-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ .../const-name-redeclaration-attempt-with-let.js | 23 +++++++++++++++++++++ .../const-name-redeclaration-attempt-with-var.js | 23 +++++++++++++++++++++ ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ ...nction-name-redeclaration-attempt-with-class.js | 23 +++++++++++++++++++++ ...nction-name-redeclaration-attempt-with-const.js | 23 +++++++++++++++++++++ ...e-redeclaration-attempt-with-function-strict.js | 24 ++++++++++++++++++++++ ...on-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ ...function-name-redeclaration-attempt-with-let.js | 23 +++++++++++++++++++++ ...function-name-redeclaration-attempt-with-var.js | 23 +++++++++++++++++++++ ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ ...erator-name-redeclaration-attempt-with-class.js | 24 ++++++++++++++++++++++ ...erator-name-redeclaration-attempt-with-const.js | 24 ++++++++++++++++++++++ ...tor-name-redeclaration-attempt-with-function.js | 24 ++++++++++++++++++++++ ...or-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ ...enerator-name-redeclaration-attempt-with-let.js | 24 ++++++++++++++++++++++ ...enerator-name-redeclaration-attempt-with-var.js | 24 ++++++++++++++++++++++ ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ .../let-name-redeclaration-attempt-with-class.js | 23 +++++++++++++++++++++ .../let-name-redeclaration-attempt-with-const.js | 23 +++++++++++++++++++++ ...let-name-redeclaration-attempt-with-function.js | 23 +++++++++++++++++++++ ...et-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ .../let-name-redeclaration-attempt-with-let.js | 23 +++++++++++++++++++++ .../let-name-redeclaration-attempt-with-var.js | 23 +++++++++++++++++++++ .../switch/syntax/redeclaration/shell.js | 0 ...me-redeclaration-attempt-with-async-function.js | 24 ++++++++++++++++++++++ ...e-redeclaration-attempt-with-async-generator.js | 24 ++++++++++++++++++++++ .../var-name-redeclaration-attempt-with-class.js | 23 +++++++++++++++++++++ .../var-name-redeclaration-attempt-with-const.js | 23 +++++++++++++++++++++ ...var-name-redeclaration-attempt-with-function.js | 23 +++++++++++++++++++++ ...ar-name-redeclaration-attempt-with-generator.js | 24 ++++++++++++++++++++++ .../var-name-redeclaration-attempt-with-let.js | 23 +++++++++++++++++++++ .../var-name-redeclaration-attempt-with-var.js | 18 ++++++++++++++++ .../language/statements/switch/syntax/shell.js | 0 68 files changed, 1507 insertions(+) create mode 100644 js/src/tests/test262/language/statements/switch/syntax/browser.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/browser.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function-strict.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/shell.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-var.js create mode 100644 js/src/tests/test262/language/statements/switch/syntax/shell.js (limited to 'js/src/tests/test262/language/statements/switch/syntax') diff --git a/js/src/tests/test262/language/statements/switch/syntax/browser.js b/js/src/tests/test262/language/statements/switch/syntax/browser.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..3ee12c3def --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..60eec83b9c --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration, async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..4728da3f76 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..2289b841bb --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..b52c942573 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..def04c2f1c --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators, async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..0999405b9d --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..4ec45cf633 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncFunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function f() {} default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..828b885263 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions, async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..1cac5dc1fc --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..6c8c86a5cb --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..2056071877 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..8b953d7f2a --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..b04bf4d0fe --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators, async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..4608ab9a43 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..a0c1869be9 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (AsyncGeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: async function* f() {} default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/browser.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/browser.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..fad2f88bb5 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..8d341655db --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..4ad5a0ea36 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with ClassDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..c1c93ffde9 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..8c1574c04e --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..dd1ec79966 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..ff7ebcca51 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..bfb72715b4 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-class-declaration.template +/*--- +description: redeclaration with VariableDeclaration (ClassDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: class f {} default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..ff5c0091a1 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..8913273ff4 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..2cd4a1d34d --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..72fa1dbd58 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..f23baad402 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..d577f27d4a --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..5bac48e93a --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..e3645885ed --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-const-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (const) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: const f = 0; default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..cae926f3d2 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..28d3c1e581 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..1095081ff9 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with ClassDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..8250fb9ff8 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function-strict.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function-strict.js new file mode 100644 index 0000000000..0a56688b39 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function-strict.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +'use strict'; +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated, onlyStrict] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..3914f675af --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..154045a3d5 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..6b158a101e --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-function-declaration.template +/*--- +description: redeclaration with VariableDeclaration (FunctionDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function f() {} default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..04fbfaad85 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions, generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..a5ecdae257 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration, generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..468c37536a --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with ClassDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..9cbbb3f6e1 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..084bf41aa9 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..275b18e9b2 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..8c4bf0e039 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..4d6112bbf3 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-generator-declaration.template +/*--- +description: redeclaration with VariableDeclaration (GeneratorDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: function* f() {} default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..b5ff40d149 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..bf790d7c96 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..d2ceea9121 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with ClassDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..2a54582b3e --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..43e7f084e1 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..67ae4d146a --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..1f83668e8e --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any + duplicate entries. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..952bf84ee0 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-let-declaration.template +/*--- +description: redeclaration with VariableDeclaration (LexicalDeclaration (let) in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: let f; default: var f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/shell.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/shell.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js new file mode 100644 index 0000000000..b7e4561feb --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-function.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncFunctionDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-functions] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: async function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js new file mode 100644 index 0000000000..0671fe46ff --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/async-generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [async-iteration] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: async function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js new file mode 100644 index 0000000000..8b073c8ed9 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/class.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with ClassDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: class f {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js new file mode 100644 index 0000000000..d0b77f0ca8 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/const.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with const-LexicalDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: const f = 0 } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js new file mode 100644 index 0000000000..ea3a499441 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/function.case +// - src/declarations/redeclare-allow-sloppy-function/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with FunctionDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: function f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js new file mode 100644 index 0000000000..3d7a9df12d --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/generator.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with GeneratorDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +features: [generators] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: function* f() {} } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js new file mode 100644 index 0000000000..0eaf5ec31e --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/declarations/let.case +// - src/declarations/redeclare/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with let-LexicalDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. + +---*/ + + +$DONOTEVALUATE(); + +switch (0) { case 1: var f; default: let f } diff --git a/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-var.js b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-var.js new file mode 100644 index 0000000000..fbfd7f52c0 --- /dev/null +++ b/js/src/tests/test262/language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-var.js @@ -0,0 +1,18 @@ +// This file was procedurally generated from the following sources: +// - src/declarations/var.case +// - src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-var-declaration.template +/*--- +description: redeclaration with VariableDeclaration (VariableDeclaration in SwitchStatement) +esid: sec-switch-statement-static-semantics-early-errors +flags: [generated] +info: | + SwitchStatement : switch ( Expression ) CaseBlock + + It is a Syntax Error if any element of the LexicallyDeclaredNames of + CaseBlock also occurs in the VarDeclaredNames of CaseBlock. +---*/ + + +switch (0) { case 1: var f; default: var f } + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/statements/switch/syntax/shell.js b/js/src/tests/test262/language/statements/switch/syntax/shell.js new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3