Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jan 11, 2020
1 parent 131fb97 commit 39f0def
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Psalm/Internal/Type/AssertionReconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,16 @@ public static function reconcile(
if (empty($existing_var_type->getAtomicTypes())) {
$failed_reconciliation = 2;

if (IssueBuffer::accepts(
new TypeDoesNotContainType(
'Cannot resolve types for ' . $key . ' on null var',
$code_location
),
$suppressed_issues
)) {
// fall through
if ($code_location) {
if (IssueBuffer::accepts(
new TypeDoesNotContainType(
'Cannot resolve types for ' . $key . ' on null var',
$code_location
),
$suppressed_issues
)) {
// fall through
}
}

return Type::getEmpty();
Expand Down

0 comments on commit 39f0def

Please sign in to comment.