Type\nonnull()
is not narrowed by phpstan
#486
Labels
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Describe the bug
Type\nonnull()
is not narrowed by phpstanTo Reproduce
Expected behavior
First method shows a way (provided by @ondrejmirtes) that this can work in phpstan.
The second method use
Type\nonnull()
.The dumped types here should be
int|null
followed byint
for bothdumpTypes
. but we get:The Psl version of the function "narrows"
int|null
tomixed
, notint
The text was updated successfully, but these errors were encountered: