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

Parser error triggers internal error #4000

Closed
muglug opened this issue Oct 24, 2020 · 4 comments
Closed

Parser error triggers internal error #4000

muglug opened this issue Oct 24, 2020 · 4 comments

Comments

@muglug
Copy link
Contributor

muglug commented Oct 24, 2020

Not sure whether this is really a bug, saw on phpstan.org:

<?php return [,"a"];

https://phpstan.org/r/2d55784d-1a6e-4abd-86fa-5c0f3353bd62

@ondrejmirtes
Copy link
Member

Fixed, thank you! Surprised me parser lets this through :) phpstan/phpstan-src@a97477b

@muglug
Copy link
Contributor Author

muglug commented Oct 24, 2020

It's because the same object is used for array destructuring. Should change in v5: nikic/PHP-Parser#471

@ondrejmirtes
Copy link
Member

I know about that, but it could still have been a parse error when not on LHS of assignment :)

@github-actions
Copy link

github-actions bot commented May 9, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants