You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generics is not resolved correctly when iterating over items from generic collection with restricted subtypes.
When accessing individual elements of the array, the type is resolved correctly. Parameter #1 $v of method F<T of A|B>::getDetail() expects T of A|B, A|B given.
Bug report
Generics is not resolved correctly when iterating over items from generic collection with restricted subtypes.
When accessing individual elements of the array, the type is resolved correctly.
Parameter #1 $v of method F<T of A|B>::getDetail() expects T of A|B, A|B given.
Code snippet that reproduces the problem
https://phpstan.org/r/efaf401b-e73c-4f08-9980-d386d5ec576b#
Expected output
No error should be thrown.
The text was updated successfully, but these errors were encountered: