-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
phpstan/phpstan-src
#5050Labels
Milestone
Description
Bug report
Array with explicit type:
/** @var mixed[] $arr */becomes implicit mixed[] after if statement:
if ($arr['key'] > 1) {}and if there is parameter checkImplicitMixed: true than it reports error:
Cannot cast mixed to string.
Note: There is no way to fully reproduce the issue in the playground because there is no possibility to set parameter checkImplicitMixed: true in it.
Code snippet that reproduces the problem
https://phpstan.org/r/6f6e5ab8-433a-464e-a37e-8ae479c04369
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
It is awesome!
Reactions are currently unavailable