Skip to content

Commit

Permalink
fix an old test
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Oct 9, 2021
1 parent d44d00f commit a1df08f
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -348,6 +348,13 @@ private static function getReturnTypeFromCallMapWithArgs(
return new Type\Union([new Type\Atomic\TIntRange($min, null)]);
}

if ($atomic_types['array'] instanceof Type\Atomic\TArray
&& $atomic_types['array']->type_params[0]->isEmpty()
&& $atomic_types['array']->type_params[1]->isEmpty()
) {
return Type::getInt(false, 0);
}

return new Type\Union([
new Type\Atomic\TLiteralInt(0),
new Type\Atomic\TPositiveInt
Expand Down

0 comments on commit a1df08f

Please sign in to comment.