From 3a5063c07cbaf360bcc8c8f91a13d32ae41ed70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Tue, 12 Nov 2024 18:58:55 +0100 Subject: [PATCH] Add missing reset of context inside_general_use --- .../Expression/Fetch/InstancePropertyFetchAnalyzer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php index acf004490c1..f0c1131400a 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php @@ -47,6 +47,8 @@ public static function analyze( if (!$stmt->name instanceof PhpParser\Node\Identifier) { if (ExpressionAnalyzer::analyze($statements_analyzer, $stmt->name, $context) === false) { + $context->inside_general_use = $was_inside_general_use; + return false; } }