From d440e4bbb1a739f85fcf014246102d1fa3c8a68a Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Thu, 14 Dec 2017 11:33:18 -0500 Subject: [PATCH] Keep going after seeing a type coercion --- .../Checker/Statements/Expression/CallChecker.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Psalm/Checker/Statements/Expression/CallChecker.php b/src/Psalm/Checker/Statements/Expression/CallChecker.php index 3f425759e..a466706aa 100644 --- a/src/Psalm/Checker/Statements/Expression/CallChecker.php +++ b/src/Psalm/Checker/Statements/Expression/CallChecker.php @@ -2315,7 +2315,7 @@ class CallChecker ), $statements_checker->getSuppressedIssues() )) { - return false; + // keep soldiering on } } else { if (IssueBuffer::accepts( @@ -2326,12 +2326,12 @@ class CallChecker ), $statements_checker->getSuppressedIssues() )) { - return false; + // keep soldiering on } } } - if (!$type_match_found) { + if (!$coerced_type && !$type_match_found) { $types_can_be_identical = TypeChecker::canBeIdenticalTo( $project_checker, $input_type, @@ -2503,7 +2503,7 @@ class CallChecker ), $statements_checker->getSuppressedIssues() )) { - return false; + // keep soldiering on } } else { if (IssueBuffer::accepts( @@ -2514,7 +2514,7 @@ class CallChecker ), $statements_checker->getSuppressedIssues() )) { - return false; + // keep soldiering on } } }