diff --git a/src/Psalm/Type/Atomic/ObjectLike.php b/src/Psalm/Type/Atomic/ObjectLike.php index 0d84c5942e1..2858b64da93 100644 --- a/src/Psalm/Type/Atomic/ObjectLike.php +++ b/src/Psalm/Type/Atomic/ObjectLike.php @@ -123,6 +123,8 @@ function ($name, Union $type): string { implode(', ', $property_strings) . '}' . ($this->previous_value_type + && (!$this->previous_value_type->isMixed() + || ($this->previous_key_type && !$this->previous_key_type->isArrayKey())) ? '<' . ($this->previous_key_type ? $this->previous_key_type->getId() . ', ' : '') . $this->previous_value_type->getId() . '>' : '');