1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Only compare non-null types

This commit is contained in:
Matt Brown 2017-04-06 18:11:09 -04:00
parent c09b0e459a
commit 8a20aca4cf

View File

@ -286,11 +286,13 @@ class AssertionFinder
if (!TypeChecker::isContainedBy(
$var_type,
$other_type,
$source->getFileChecker()
$source->getFileChecker(),
true
) && !TypeChecker::isContainedBy(
$other_type,
$var_type,
$source->getFileChecker()
$source->getFileChecker(),
true
)) {
if (IssueBuffer::accepts(
new TypeDoesNotContainType(