Skip to content

Commit

Permalink
Remove unnecessary array assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Feb 16, 2022
1 parent e47752a commit 6af3b50
Showing 1 changed file with 0 additions and 10 deletions.
Expand Up @@ -1163,7 +1163,6 @@ private static function handleArrayAccessOnArray(
$offset_type,
$in_assignment,
$expected_offset_types,
$replacement_type,
$array_access_type,
$original_type,
$has_valid_offset
Expand Down Expand Up @@ -1231,7 +1230,6 @@ private static function handleArrayAccessOnTArray(
Union $offset_type,
bool $in_assignment,
array &$expected_offset_types,
?Union $replacement_type,
?Union &$array_access_type,
Atomic $original_type,
bool &$has_valid_offset
Expand Down Expand Up @@ -1351,14 +1349,6 @@ private static function handleArrayAccessOnTArray(
$type->count++;
}

if ($in_assignment && $replacement_type) {
$type->type_params[1] = Type::combineUnionTypes(
$type->type_params[1],
$replacement_type,
$codebase
);
}

$array_access_type = Type::combineUnionTypes(
$array_access_type,
$type->type_params[1]
Expand Down

0 comments on commit 6af3b50

Please sign in to comment.