mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 02:27:59 +01:00
clobber better
This commit is contained in:
parent
a84587e6c3
commit
c22fc15bfa
@ -492,11 +492,13 @@ abstract class Type
|
|||||||
|
|
||||||
// if we're merging an empty array with an object-like, clobber empty array
|
// if we're merging an empty array with an object-like, clobber empty array
|
||||||
if ($generic_type === 'array'
|
if ($generic_type === 'array'
|
||||||
|
&& isset($value_types['object-like'])
|
||||||
&& count($value_type) === 1
|
&& count($value_type) === 1
|
||||||
&& isset($value_type['empty'])
|
&& isset($value_type['empty'])
|
||||||
&& count($key_type) === 1
|
&& count($key_type) === 1
|
||||||
&& isset($key_type['empty'])
|
&& (isset($key_type['empty']) || isset($key_type['string']))
|
||||||
) {
|
) {
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user