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

Remove unnecessary parentheses around typecasts #383

Closed
matthargett opened this issue Feb 19, 2022 · 1 comment · Fixed by #419
Closed

Remove unnecessary parentheses around typecasts #383

matthargett opened this issue Feb 19, 2022 · 1 comment · Fixed by #419
Labels
enhancement New feature or request

Comments

@matthargett
Copy link

                                    local firstPendingUpdate = ((lastPendingUpdate.next :: any) :: Update<State>)

what happens in-context:
image

@JohnnyMorganz JohnnyMorganz added the enhancement New feature or request label Feb 19, 2022
@JohnnyMorganz JohnnyMorganz changed the title should remove superfluous parenthesis Remove unnecessary parentheses around typecasts Feb 20, 2022
@JohnnyMorganz
Copy link
Owner

Cases we need to ensure we keep parentheses:

local x = #(expr :: Array<any>)
local y = -(expr :: number)
local z = (expr :: any) :: string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants