1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Set types on static property evaluation

This commit is contained in:
Matthew Brown 2016-10-12 01:38:16 -04:00
parent e152a8f6f1
commit 14606bddbb

View File

@ -3560,9 +3560,9 @@ class StatementsChecker
$class_visibility
);
if (!isset($visible_class_properties[$stmt->name])) {
$var_id = $absolute_class . '::$' . $stmt->name;
$var_id = $absolute_class . '::$' . $stmt->name;
if (!isset($visible_class_properties[$stmt->name])) {
$all_class_properties = [];
if ($absolute_class !== $context->self) {
@ -3585,6 +3585,9 @@ class StatementsChecker
return false;
}
$context->vars_in_scope[$var_id] = clone $visible_class_properties[$stmt->name];
$stmt->inferredType = clone $visible_class_properties[$stmt->name];
}
}