-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
I typed a list. Then passed it into array_map(). The return type of array map is not inferred correctly.
Method HelloWorld::a() should return iterable<array('a' => int)> but returns array<int, array>.
Method HelloWorld::b() should return iterable<array('a' => string)> but returns array<int, array&nonEmpty>.
Error message is not helping much here.
Code snippet that reproduces the problem
https://phpstan.org/r/7209aa2b-9f31-4db0-b7f7-c820c052bfbd
Expected output
No errors. I even think that typing the inner callable might not be necessary? Not sure about that.
Reactions are currently unavailable