1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00

clobber better

This commit is contained in:
Matthew Brown 2016-10-02 22:00:05 -04:00
parent a84587e6c3
commit c22fc15bfa

View File

@ -492,11 +492,13 @@ abstract class Type
// if we're merging an empty array with an object-like, clobber empty array
if ($generic_type === 'array'
&& isset($value_types['object-like'])
&& count($value_type) === 1
&& isset($value_type['empty'])
&& count($key_type) === 1
&& isset($key_type['empty'])
&& (isset($key_type['empty']) || isset($key_type['string']))
) {
continue;
}