-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#2902Description
Bug report
array_map ignores a union of callables and assumes only the first of the union will be used, leading to an incorrectly inferred return type.
This line appears to be where the issue originates from, as the dynamic return type extension is asking for the parameter acceptors from here.
Code snippet that reproduces the problem
https://phpstan.org/r/216eb0ae-bd17-4f8d-badd-466f7d2aee6e
Expected output
Expectations specified in playground with assertType
Did PHPStan help you today? Did it make you happy in any way?
As always!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels