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

BracesFixer - fix invalid code generation on alternative syntax #4813

wants to merge 2 commits into
base: 2.15


Copy link

SpacePossum commented Feb 14, 2020

Fixes #4811

Basically this skips some edge cases when using alternative syntax. For now I don't want to add a lot of logic to support this case fully as we are splitting this fixer in the future anyway. Secondly we don't support alternative syntax in a lot of cases in the project.

For those interested; BracesFixer::findStatementEnd doesn't find the correct index for some of the alternative syntax expressions (see utests)

@SpacePossum SpacePossum added this to the 2.15.6 milestone Feb 14, 2020
@SpacePossum SpacePossum added the RTM label Feb 14, 2020

This comment has been minimized.

Copy link

kubawerlos commented Feb 15, 2020

What about switch? It also can use alternative syntax.


This comment has been minimized.

Copy link
Member Author

SpacePossum commented Feb 15, 2020

it is here; but happy to add more tests!

good find, thanks! code and tests updated

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.