-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
False positive: Access to an undefined property T of A|B|C::$name (regression) #6566
Comments
Thank you very much for trying out dev-master and finding this bug! Although I hope you're using a stable version in your usual day-to-day work :) /cc @arnaud-lb I will try to improve |
@ondrejmirtes it may be safe to apply ::remove() on the bound and return a new template type with that bound, since ::remove() narrows the type. With phpstan/phpstan-src#999, the resulting template type will also still be accepted by the original template type. |
Yeah, that's exactly what I want to do. I'm a bit surprised that intersection works already: https://phpstan.org/r/da79b871-df02-47e0-99f4-9561f2949499 |
Fixed: phpstan/phpstan-src@0d28835 |
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. |
Bug report
Error appeared after
v1.4.5 is fine
Code snippet that reproduces the problem
https://phpstan.org/r/cd4aa1fe-61dc-46c6-bfd5-931540ab74e4
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
Yep, it found one very stupid typo...
The text was updated successfully, but these errors were encountered: