From 6ba8876153c47e6ce5390f6984098017ea7a30cd Mon Sep 17 00:00:00 2001 From: orklah Date: Thu, 19 Aug 2021 20:40:25 +0200 Subject: [PATCH] remove cache after unsetting a key from a TKeyedArray --- src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php index b66709415..3943db8e4 100644 --- a/src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php @@ -51,6 +51,7 @@ class UnsetAnalyzer ) { if (isset($atomic_root_type->properties[$var->dim->value])) { unset($atomic_root_type->properties[$var->dim->value]); + $root_type->bustCache(); //remove id cache } if (!$atomic_root_type->properties) {