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.
Bug report
array{a, b}|array{c, d}is improperly collapsed asarray{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.