diff --git a/test/language/statements/do-while/let-array-with-newline.js b/test/language/statements/do-while/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..faf318f0e1d5b6b5c16832d029e8747539b74cab --- /dev/null +++ b/test/language/statements/do-while/let-array-with-newline.js @@ -0,0 +1,20 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-do-while-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +do let +[x] = 0 +while (false); diff --git a/test/language/statements/for-await-of/let-array-with-newline.js b/test/language/statements/for-await-of/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..08b68c1b2d9f9a350f28107e6bb81771e7846564 --- /dev/null +++ b/test/language/statements/for-await-of/let-array-with-newline.js @@ -0,0 +1,22 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let + [a] = 0; +} diff --git a/test/language/statements/for-await-of/let-block-with-newline.js b/test/language/statements/for-await-of/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..ba5a9ee3db243a5074236eb13501eebe2406ebd0 --- /dev/null +++ b/test/language/statements/for-await-of/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let // ASI + {} +} diff --git a/test/language/statements/for-await-of/let-identifier-with-newline.js b/test/language/statements/for-await-of/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..87a3cb38d0748cc00107948d825e247383301e8d --- /dev/null +++ b/test/language/statements/for-await-of/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let // ASI + x = 1; +} diff --git a/test/language/statements/for-in/let-array-with-newline.js b/test/language/statements/for-in/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..7acf629235ecf863ffb62c5991bd5cc8d9995889 --- /dev/null +++ b/test/language/statements/for-in/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (var x in null) let +[a] = 0; diff --git a/test/language/statements/for-in/let-block-with-newline.js b/test/language/statements/for-in/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..05fe78c5939d607f0bc6ab6fd0f37dcc8958f0d3 --- /dev/null +++ b/test/language/statements/for-in/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x in null) let // ASI +{} diff --git a/test/language/statements/for-in/let-identifier-with-newline.js b/test/language/statements/for-in/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..b3f148230c7a4648e5bb23ae312aaa006d1c7e9d --- /dev/null +++ b/test/language/statements/for-in/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x in null) let // ASI +x = 1; diff --git a/test/language/statements/for-of/let-array-with-newline.js b/test/language/statements/for-of/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..4d19ec3fa318e1ec24aaa9d68403d0caf149ee67 --- /dev/null +++ b/test/language/statements/for-of/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (var x of []) let +[a] = 0; diff --git a/test/language/statements/for-of/let-block-with-newline.js b/test/language/statements/for-of/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..1f19ec14bf2f0c675a9e6ee9b94368a91748bace --- /dev/null +++ b/test/language/statements/for-of/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x of []) let // ASI +{} diff --git a/test/language/statements/for-of/let-identifier-with-newline.js b/test/language/statements/for-of/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..63e088c1c37bbdd96efe1b3c4ed56f7efa0531b1 --- /dev/null +++ b/test/language/statements/for-of/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x of []) let // ASI +x = 1; diff --git a/test/language/statements/for/let-array-with-newline.js b/test/language/statements/for/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..da29097908889a9b2f55808da5fb6d3fb317b1ab --- /dev/null +++ b/test/language/statements/for/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (; false; ) let +[a] = 0; diff --git a/test/language/statements/for/let-block-with-newline.js b/test/language/statements/for/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..681f0b34a6ad4f08e414732833305d8077cd3579 --- /dev/null +++ b/test/language/statements/for/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (; false; ) let // ASI +{} diff --git a/test/language/statements/for/let-identifier-with-newline.js b/test/language/statements/for/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..ba18fac90d900fa6ac277759c34d621e2ab39640 --- /dev/null +++ b/test/language/statements/for/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (; false; ) let // ASI +x = 1; diff --git a/test/language/statements/if/let-array-with-newline.js b/test/language/statements/if/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..e0d970d4d06ea3114ed1a37314f3d73d451078d2 --- /dev/null +++ b/test/language/statements/if/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +if (false) let +[a] = 0; diff --git a/test/language/statements/if/let-block-with-newline.js b/test/language/statements/if/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..aac5dbb3d383e332bfb667ac39eb6f19f1f57571 --- /dev/null +++ b/test/language/statements/if/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +if (false) let // ASI +{} diff --git a/test/language/statements/if/let-identifier-with-newline.js b/test/language/statements/if/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..e4a646a5a08171233e598a66faa2ad7a81531e26 --- /dev/null +++ b/test/language/statements/if/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +if (false) let // ASI +x = 1; diff --git a/test/language/statements/labeled/let-array-with-newline.js b/test/language/statements/labeled/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..c8d5ffaa977b9e411ea00e0222c8168a92531a95 --- /dev/null +++ b/test/language/statements/labeled/let-array-with-newline.js @@ -0,0 +1,22 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-labelled-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let + [a] = 0; +} diff --git a/test/language/statements/labeled/let-block-with-newline.js b/test/language/statements/labeled/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..8a8d44c065ffbafe9ff62bf0d8657885e35191e4 --- /dev/null +++ b/test/language/statements/labeled/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-labelled-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let // ASI + {} +} diff --git a/test/language/statements/labeled/let-identifier-with-newline.js b/test/language/statements/labeled/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..b8a184d7b52e8e5a9d03e50469fb4a0bade44379 --- /dev/null +++ b/test/language/statements/labeled/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-labelled-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let // ASI + x = 1; +} diff --git a/test/language/statements/while/let-array-with-newline.js b/test/language/statements/while/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..55b13d6d097653525ec068ad5655baff0f8d1aec --- /dev/null +++ b/test/language/statements/while/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +while (false) let +[a] = 0; diff --git a/test/language/statements/while/let-block-with-newline.js b/test/language/statements/while/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..fa2a2ae6d7287a450efa7bb7c33f0453a5d21da0 --- /dev/null +++ b/test/language/statements/while/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +while (false) let // ASI +{} diff --git a/test/language/statements/while/let-identifier-with-newline.js b/test/language/statements/while/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..634960798dde0f55f719878145a28a26ee31ff58 --- /dev/null +++ b/test/language/statements/while/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +while (false) let // ASI +x = 1; diff --git a/test/language/statements/with/let-array-with-newline.js b/test/language/statements/with/let-array-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..d1e53378ebedf45232b27c111c2248a75db64f93 --- /dev/null +++ b/test/language/statements/with/let-array-with-newline.js @@ -0,0 +1,22 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let + [a] = 0; +} diff --git a/test/language/statements/with/let-block-with-newline.js b/test/language/statements/with/let-block-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..90d0141a0efe35bf2a2d3c71f76cab511e9f9cec --- /dev/null +++ b/test/language/statements/with/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let // ASI + {} +} diff --git a/test/language/statements/with/let-identifier-with-newline.js b/test/language/statements/with/let-identifier-with-newline.js new file mode 100644 index 0000000000000000000000000000000000000000..f938fc2c8c63b89ce7f62508c392e85ba4800ffe --- /dev/null +++ b/test/language/statements/with/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let <binding-identifier>`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let // ASI + x = 1; +}