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
T doesn't accept T&DateTimeInterface #6418
Comments
Seems to be caused by https://github.com/phpstan/phpstan-src/blob/875f156d386fa789cf543b701d8a719284574fa4/src/Rules/RuleLevelHelper.php#L55. |
@arnaud-lb After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-11: Function test() should return T but returns DateTimeInterface&T.
+No errors |
Fixed: phpstan/phpstan-src@9f12f0f |
Closes phpstan/phpstan#6464 Closes phpstan/phpstan#6423 Closes phpstan/phpstan#6418 Closes phpstan/phpstan#6230 Closes phpstan/phpstan#5860
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
Code snippet that reproduces the problem
https://phpstan.org/r/d4a4ee11-f3e6-44e4-b9a9-88d4310d2c40
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is awesome
The text was updated successfully, but these errors were encountered: