Skip to content

Clarify the use of 'using' as a variable reference expression in for loop conditions #4961

@kaleidawave

Description

@kaleidawave

There are currently two tests which show the fallback behaviour of using as variable identifiers


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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions