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) {