Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedundantBraces: fix "moving" braces around func #3834

Merged
merged 1 commit into from Mar 16, 2024

Commits on Mar 16, 2024

  1. RedundantBraces: fix "moving" braces around func

    Previously, we'd handle the case of `foo(x => { ... })` by:
    1. replacing the `(` with a `{`
    2. "pretending" to replace the `{` with a `(`
    3. upon encountering the `}` for a fake `(`, removing the `(` and
       changing on the owner of the `}`
    4. then removing the `)`
    
    Instead, let's modify steps 2, 3 and 4 as follows:
    2. remove `{`
    3. remove `}`
    4. replace the closing `)` with a `}` moving it to the position of the
       `}` in step 3, along with token ownership.
    kitbellew committed Mar 16, 2024
    Copy the full SHA
    4e710c1 View commit details
    Browse the repository at this point in the history