Skip to content

Commit

Permalink
Possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 17, 2022
1 parent 150be5c commit 860224a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Internal/Type/TypeCombiner.php
Expand Up @@ -1167,7 +1167,8 @@ private static function scrapeIntProperties(
}

if ($type instanceof TLiteralInt) {
if ($combination->ints !== null && count($combination->ints) < $literal_limit) {
$combination->ints ??= [];
if (count($combination->ints) < $literal_limit) {
$combination->ints[$type_key] = $type;
} else {
$combination->ints[$type_key] = $type;
Expand Down

0 comments on commit 860224a

Please sign in to comment.