Skip to content
Permalink
Browse files

Add null check

  • Loading branch information
muglug committed Jan 11, 2020
1 parent 131fb97 commit 39f0def7bfbb6271abc3b1fc2e9dcac9a926c7e0
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/Psalm/Internal/Type/AssertionReconciler.php
@@ -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();

0 comments on commit 39f0def

Please sign in to comment.
You can’t perform that action at this time.