1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Do not stop at magic setter when property referenced locally

This commit is contained in:
Matthew Brown 2017-03-18 15:00:01 -04:00
parent 3452c7853f
commit 18af05fbd9

View File

@ -587,7 +587,7 @@ class AssignmentChecker
return null; return null;
} }
if (MethodChecker::methodExists($lhs_type_part . '::__set', $file_checker)) { if ($lhs_var_id !== '$this' && MethodChecker::methodExists($lhs_type_part . '::__set', $file_checker)) {
if ($var_id) { if ($var_id) {
$context->vars_in_scope[$var_id] = Type::getMixed(); $context->vars_in_scope[$var_id] = Type::getMixed();
} }