Bug report
In https://phpstan.org/r/4f185506-7a6f-45dc-8082-d717cb448b7d
The inference non-empty-array{a?: 2, b?: 2, c?: 2} is wrong and should be non-empty-array{a?: 0|1|2, b?: 0|1|2, c?: 0|1|2}
Seems like the last key overrides every possible values even if it's an unionType (and therefor cannot override multiple keys at the same time).
Code snippet that reproduces the problem
https://phpstan.org/r/4f185506-7a6f-45dc-8082-d717cb448b7d
Expected output
non-empty-array{a?: 0|1|2, b?: 0|1|2, c?: 0|1|2}
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
In https://phpstan.org/r/4f185506-7a6f-45dc-8082-d717cb448b7d
The inference
non-empty-array{a?: 2, b?: 2, c?: 2}is wrong and should benon-empty-array{a?: 0|1|2, b?: 0|1|2, c?: 0|1|2}Seems like the last key overrides every possible values even if it's an unionType (and therefor cannot override multiple keys at the same time).
Code snippet that reproduces the problem
https://phpstan.org/r/4f185506-7a6f-45dc-8082-d717cb448b7d
Expected output
non-empty-array{a?: 0|1|2, b?: 0|1|2, c?: 0|1|2}Did PHPStan help you today? Did it make you happy in any way?
No response