1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Improve count inference

This commit is contained in:
Matt Brown 2021-05-14 20:12:28 -04:00
parent c4aea7c82c
commit 5f780e7ef7

View File

@ -320,7 +320,7 @@ class FunctionCallReturnTypeFetcher
}
if ($atomic_types['array'] instanceof Type\Atomic\TKeyedArray
&& $atomic_types['array']->sealed
&& $atomic_types['array']->isNonEmpty()
) {
return new Type\Union([
new Type\Atomic\TLiteralInt(count($atomic_types['array']->properties))