Bug report
Using version 1.10.3, a code snippet when an array key is sometimes initialized to a string, some other times completed as an array results in the array key always being considered an array.
Code snippet that reproduces the problem
https://phpstan.org/r/9560820d-70e1-4af0-a70e-da4774f84e8c
Expected output
There should IMO be no issue here, and the dumped type should be array{}|array{hi: non-empty-array<int, 42>|'hello'}
Did PHPStan help you today? Did it make you happy in any way?
I was happy to be able to reproduce the issue easily thanks to the playground.
Bug report
Using version 1.10.3, a code snippet when an array key is sometimes initialized to a string, some other times completed as an array results in the array key always being considered an array.
Code snippet that reproduces the problem
https://phpstan.org/r/9560820d-70e1-4af0-a70e-da4774f84e8c
Expected output
There should IMO be no issue here, and the dumped type should be
array{}|array{hi: non-empty-array<int, 42>|'hello'}Did PHPStan help you today? Did it make you happy in any way?
I was happy to be able to reproduce the issue easily thanks to the playground.