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
Type changed to *NEVER* #5896
Comments
But this is correct behaviour in your example, as the path is never executable because the condition will be always |
How |
It's at least a bit weird because PHPStan should report "always false" for |
I've removed parts which do nothing. Here is added some modification for $y https://phpstan.org/r/66f180f1-4352-49a9-9a3d-081f71ee2665 |
@lulco After the latest commit in 1.8.x, PHPStan now reports different result with your code snippet: @@ @@
19: Dumped type: array{default?: int}
-21: Dumped type: *NEVER*
+21: Dumped type: array{default?: int} Full report
|
@lulco After the latest commit in 1.8.x, PHPStan now reports different result with your code snippet: @@ @@
22: Dumped type: array{default?: int}
-24: Dumped type: *NEVER*
+24: Dumped type: array{default?: int} Full report
|
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
PHPStan changed type from
array
(in my casearray{default?: int}
) to*NEVER*
. I discover that this behavior was introduced in version 0.12.60 (0.12.59 is OK).Code snippet that reproduces the problem
https://phpstan.org/r/8851a26d-ccfc-43e2-95b6-acf531da1d09
Expected output
Do not change type to
*NEVER*
. Let it be as before.The text was updated successfully, but these errors were encountered: