mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Use fallback assignment type when the property doesn’t exist on the class
This commit is contained in:
parent
71b291caac
commit
2a30e49d88
@ -759,6 +759,8 @@ class InstancePropertyAssignmentAnalyzer
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$context_type = $context_type ?: $assignment_value_type;
|
||||||
|
|
||||||
if ($var_id && $context_type) {
|
if ($var_id && $context_type) {
|
||||||
if ($context->collect_initializations
|
if ($context->collect_initializations
|
||||||
&& $lhs_var_id === '$this'
|
&& $lhs_var_id === '$this'
|
||||||
|
Loading…
Reference in New Issue
Block a user