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

Dead catch is thrown for dynamic constructors #4806

Closed
mabar opened this issue Apr 5, 2021 · 3 comments
Closed

Dead catch is thrown for dynamic constructors #4806

mabar opened this issue Apr 5, 2021 · 3 comments

Comments

@mabar
Copy link
Contributor

mabar commented Apr 5, 2021

Bug report

Dead catch does not work with new $class();

Code snippet that reproduces the problem

https://phpstan.org/r/dd8f6b4f-22f8-4381-8e0b-8d92e07bf1d5

Expected output

Explained in snippet - createNotSpecified() and createMayThrowArgumentCountError() should not throw anything, createMayThrowArgumentCountErrorB() should throw different error.

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@8463afd

@mabar
Copy link
Contributor Author

mabar commented Apr 5, 2021

Thank you!

@github-actions
Copy link

github-actions bot commented May 7, 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 7, 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