From 2ecffbdd6fafa93e14848ab75d4510c32d030f48 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sun, 12 Feb 2017 13:16:40 -0500 Subject: [PATCH] Always check methods with global scope --- src/Psalm/Checker/ClassLikeChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Checker/ClassLikeChecker.php b/src/Psalm/Checker/ClassLikeChecker.php index 49d909918..e8d93df54 100644 --- a/src/Psalm/Checker/ClassLikeChecker.php +++ b/src/Psalm/Checker/ClassLikeChecker.php @@ -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_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) { if (!isset($method_context->vars_in_scope['$this->' . $property_name])) {