diff --git a/src/Psalm/Checker/StatementsChecker.php b/src/Psalm/Checker/StatementsChecker.php index eed81520c..d8247ffd8 100644 --- a/src/Psalm/Checker/StatementsChecker.php +++ b/src/Psalm/Checker/StatementsChecker.php @@ -3648,7 +3648,7 @@ class StatementsChecker } if ($stmt->dim) { - if (isset($stmt->dim->inferredType) && $key_type) { + if (isset($stmt->dim->inferredType) && $key_type && !$key_type->isEmpty()) { foreach ($stmt->dim->inferredType->types as $at) { if ($at->isMixed()) { // @todo emit issue