@@ -3296,7 +3296,7 @@ static function (): void {
3296
3296
return new ExpressionResult (
3297
3297
$ leftMergedWithRightScope ,
3298
3298
$ leftResult ->hasYield () || $ rightResult ->hasYield (),
3299
- $ leftResult ->isAlwaysTerminating () || $ rightResult -> isAlwaysTerminating () ,
3299
+ $ leftResult ->isAlwaysTerminating (),
3300
3300
array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
3301
3301
array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
3302
3302
static fn (): MutatingScope => $ rightResult ->getScope ()->filterByTruthyValue ($ expr ),
@@ -3704,15 +3704,13 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void {
3704
3704
$ ifResult = $ this ->processExprNode ($ stmt , $ expr ->if , $ ifTrueScope , $ nodeCallback , $ context );
3705
3705
$ throwPoints = array_merge ($ throwPoints , $ ifResult ->getThrowPoints ());
3706
3706
$ impurePoints = array_merge ($ impurePoints , $ ifResult ->getImpurePoints ());
3707
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ ifResult ->isAlwaysTerminating ();
3708
3707
$ ifTrueScope = $ ifResult ->getScope ();
3709
3708
$ ifTrueType = $ ifTrueScope ->getType ($ expr ->if );
3710
3709
}
3711
3710
3712
3711
$ elseResult = $ this ->processExprNode ($ stmt , $ expr ->else , $ ifFalseScope , $ nodeCallback , $ context );
3713
3712
$ throwPoints = array_merge ($ throwPoints , $ elseResult ->getThrowPoints ());
3714
3713
$ impurePoints = array_merge ($ impurePoints , $ elseResult ->getImpurePoints ());
3715
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ elseResult ->isAlwaysTerminating ();
3716
3714
$ ifFalseScope = $ elseResult ->getScope ();
3717
3715
3718
3716
$ condType = $ scope ->getType ($ expr ->cond );
@@ -4806,7 +4804,7 @@ private function processArrowFunctionNode(
4806
4804
$ nodeCallback (new InArrowFunctionNode ($ arrowFunctionType , $ expr ), $ arrowFunctionScope );
4807
4805
$ exprResult = $ this ->processExprNode ($ stmt , $ expr ->expr , $ arrowFunctionScope , $ nodeCallback , ExpressionContext::createTopLevel ());
4808
4806
4809
- return new ExpressionResult ($ scope , false , $ exprResult -> isAlwaysTerminating () , $ exprResult ->getThrowPoints (), $ exprResult ->getImpurePoints ());
4807
+ return new ExpressionResult ($ scope , false , false , $ exprResult ->getThrowPoints (), $ exprResult ->getImpurePoints ());
4810
4808
}
4811
4809
4812
4810
/**
0 commit comments