From d247cead09e6b9050e7a138582ade4628a58fc5f Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Tue, 18 Oct 2016 11:25:15 -0400 Subject: [PATCH] Exit properly when encountering classes we cannot deal with --- src/Psalm/Checker/StatementsChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Checker/StatementsChecker.php b/src/Psalm/Checker/StatementsChecker.php index 214afbdde..336350340 100644 --- a/src/Psalm/Checker/StatementsChecker.php +++ b/src/Psalm/Checker/StatementsChecker.php @@ -1795,7 +1795,7 @@ class StatementsChecker // Hack has a similar issue: https://github.com/facebook/hhvm/issues/5164 if ($lhs_type_part->isObject() || in_array(strtolower($lhs_type_part->value), ['stdclass', 'simplexmlelement', 'dateinterval', 'domdocument', 'domnode'])) { $context->vars_in_scope[$var_id] = Type::getMixed(); - continue; + return; } if (self::isMock($lhs_type_part->value)) {