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

Handle malformed parentheses during type parsing phase #6172

Merged
merged 2 commits into from
Jul 25, 2021

Conversation

Jack97
Copy link
Contributor

@Jack97 Jack97 commented Jul 25, 2021

This PR updates the TypeParser to throw a TypeParseTreeException when unterminated, empty, or unbalanced parentheses are encountered. Previously, empty parentheses would cause Psalm to crash, and the balance was not being verified so (((((((((((string would be incorrectly evaluated as string.

Closes #6159

@weirdan weirdan merged commit 783dc61 into vimeo:master Jul 25, 2021
@weirdan
Copy link
Collaborator

weirdan commented Jul 25, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

Psalm crash on @return (
2 participants