Skip to content
Permalink
Browse files

Cleanup extra issues from recent fixes

  • Loading branch information...
muglug committed Aug 27, 2019
1 parent 1cb8c3f commit 4db8ca6a1dbee1d64da520f84f3cbc4b69fbac99
@@ -777,6 +777,8 @@ private static function handleArrayAddition(
) {
$array_arg = $args[0]->value;
$context->inside_call = true;
if (ExpressionAnalyzer::analyze(
$statements_analyzer,
$array_arg,
@@ -795,7 +797,6 @@ private static function handleArrayAddition(
}
}
$context->inside_call = true;
if (isset($array_arg->inferredType) && $array_arg->inferredType->hasArray()) {
/** @var TArray|ObjectLike */
$array_type = $array_arg->inferredType->getTypes()['array'];
@@ -452,6 +452,11 @@ public static function getArrayAccessTypeGivenOffset(
// ok, type becomes an ObjectLike
$array_type->removeType($type_string);
$type = new ObjectLike([$key_value => $from_mixed_array ? Type::getMixed() : Type::getEmpty()]);
if ($from_mixed_array) {
$type->had_mixed_value = true;
}
$array_type->addType($type);
}

0 comments on commit 4db8ca6

Please sign in to comment.
You can’t perform that action at this time.