Skip to content

Commit 105f18a

Browse files
committed
Update TypeSpecifier.php
1 parent a37c535 commit 105f18a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/Analyser/TypeSpecifier.php

+3
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ public function specifyTypesInCondition(
455455
!$context->null()
456456
&& $expr->right instanceof Expr\CallLike
457457
) {
458+
if (!$scope instanceof MutatingScope) {
459+
throw new ShouldNotHappenException();
460+
}
458461
$newScope = $scope->filterBySpecifiedTypes($result);
459462
$callType = $newScope->getType($expr->right);
460463
$newContext = TypeSpecifierContext::createTruthy($callType);

0 commit comments

Comments
 (0)