There are currently two tests which show the fallback behaviour of using as variable identifiers
|
var using = [], x = 0; |
|
|
|
{ |
|
using[x] = null; |
|
} |
|
asyncTest(async function () { |
|
await using[x]; |
|
}); |
I was looking whether there were similar tests for the for (using x of|in ...) feature but I could not find anything.
Running two on Safari (so webkit). The following parses as variable using
for (using = 0; using < 2; using += 1) console.log(0, using)
This next case parses if and only it is inside a async function
for (await using; using < 4; using += 1) console.log(1, using)
I haven't looked at the specification. It might be consulting that before adding tests for these. I can add a PR once details are known.
There are currently two tests which show the fallback behaviour of
usingas variable identifierstest262/test/language/statements/using/syntax/using-invalid-arraybindingpattern-does-not-break-element-access.js
Lines 11 to 15 in dc0a351
test262/test/language/statements/await-using/syntax/await-using-invalid-arraybindingpattern-does-not-break-element-access.js
Lines 15 to 17 in dc0a351
I was looking whether there were similar tests for the
for (using x of|in ...)feature but I could not find anything.Running two on Safari (so webkit). The following parses as variable
usingThis next case parses if and only it is inside a async function
I haven't looked at the specification. It might be consulting that before adding tests for these. I can add a PR once details are known.