Skip to content

Incorrect codegen output for ForOfStatement with BinaryExpression. #258

Open

Description

@ianm00ne

Input:for(var e of(a={},b)) c[e]
Output:for(var e of a={},b)c[e]

As seen above, parentheses are lost and the resultant output is invalid.

Activity

  1. ianm00ne commented on Aug 4, 2020

    @ianm00ne
    Author

    I've seen a similar issue with computed property names as well.

    Input: const obj = { get [(a = b, c)]() { return d } }

    Output: const obj = { get [a = b, c]() { return d } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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