-
-
Notifications
You must be signed in to change notification settings - Fork 947
Array unions are improperly collapsed #3801
Copy link
Copy link
Closed
Labels
Description
Bug report
array{a, b}|array{c, d} is improperly collapsed as array{a|c, b|d}
Code snippet that reproduces the problem
https://phpstan.org/r/2fe252ba-d874-4f42-9164-d5672993d555
Expected output
Line 10: No error
Line 30: Function do_foo() should return array(true, null)|array(null, true) but returns ....
Actually, something (else) weird seems to be going on in line 30 since the reported "actual" type doesn't seem to make any sense.
Reactions are currently unavailable