Skip to content

Commit

Permalink
Never assign never to an array
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Dec 19, 2022
1 parent 2617b68 commit 4ea5329
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/Type/Reconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,10 @@ private static function adjustTKeyedArrayType(
array &$changed_var_ids,
Union $result_type
): void {
if ($result_type->isNever()) {
return;
}

array_pop($key_parts);
$array_key = array_pop($key_parts);
array_pop($key_parts);
Expand Down

0 comments on commit 4ea5329

Please sign in to comment.