diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php index f72f7ac19..9819ae4c2 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php @@ -865,7 +865,7 @@ class ForeachAnalyzer $statements_analyzer, $foreach_expr, $context, - 'current' + 'key' ); if ($iterator_value_type && !$iterator_value_type->isMixed()) {