You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/tests-using.js
+235-3Lines changed: 235 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1154,7 +1154,7 @@ testFail("function* gen() { using yield = resource; }", "Cannot use 'yield' as i
1154
1154
testFail("async function test() { using await = resource; }","Cannot use 'await' as identifier inside an async function (1:30)",{ecmaVersion: 17,sourceType: "module"});
1155
1155
1156
1156
// Rest elements are not allowed in await using declarations
1157
-
testFail("async function test() { await using [first, ...rest] = arr; }","Unexpected token (1:36)",{ecmaVersion: 17,sourceType: "module"});
1157
+
testFail("async function test() { await using [first, ...rest] = arr; }","Unexpected token (1:44)",{ecmaVersion: 17,sourceType: "module"});
1158
1158
1159
1159
// Strict mode restrictions with await using
1160
1160
testFail("'use strict'; async function test() { await using arguments = resource; }","Binding arguments in strict mode (1:50)",{ecmaVersion: 17,sourceType: "module"});
@@ -1493,7 +1493,7 @@ test("for (using of x) {}", {
1493
1493
},{ecmaVersion: 16,sourceType: "script"});
1494
1494
1495
1495
// ES17: using should be treated as regular identifier (for-of)
1496
-
test("for (using of x) {}",{
1496
+
test("for (using of y) {}",{
1497
1497
type: "Program",
1498
1498
start: 0,
1499
1499
end: 19,
@@ -1512,7 +1512,7 @@ test("for (using of x) {}", {
0 commit comments