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

Always check methods with global scope

This commit is contained in:
Matthew Brown 2017-02-12 13:16:40 -05:00
parent 2f2b487236
commit 2ecffbdd6f

View File

@ -588,7 +588,7 @@ abstract class ClassLikeChecker extends SourceChecker implements StatementsSourc
$method_context->vars_in_scope['$this'] = Type::parseString($fq_class_name); $method_context->vars_in_scope['$this'] = Type::parseString($fq_class_name);
$method_context->vars_possibly_in_scope['$this'] = true; $method_context->vars_possibly_in_scope['$this'] = true;
$constructor_checker->analyze($method_context, null, true); $constructor_checker->analyze($method_context, $global_context, true);
foreach ($uninitialized_properties as $property_name => $property) { foreach ($uninitialized_properties as $property_name => $property) {
if (!isset($method_context->vars_in_scope['$this->' . $property_name])) { if (!isset($method_context->vars_in_scope['$this->' . $property_name])) {