diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallPurityAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallPurityAnalyzer.php index 1b5859bd6..0fde9d866 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallPurityAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallPurityAnalyzer.php @@ -158,7 +158,7 @@ class MethodCallPurityAnalyzer && !isset($class_storage->declaring_property_ids[$name]); if ($this_property_didnt_exist) { - $context->vars_in_scope[$mutation_var_id] = Type::getMixed(); + unset($context->vars_in_scope[$mutation_var_id]); } else { $new_type = AssignmentAnalyzer::getExpandedPropertyType( $codebase,