@@ -3296,7 +3296,7 @@ static function (): void {
32963296 return new ExpressionResult (
32973297 $ leftMergedWithRightScope ,
32983298 $ leftResult ->hasYield () || $ rightResult ->hasYield (),
3299- $ leftResult ->isAlwaysTerminating () || $ rightResult -> isAlwaysTerminating () ,
3299+ $ leftResult ->isAlwaysTerminating (),
33003300 array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
33013301 array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
33023302 static fn (): MutatingScope => $ rightResult ->getScope ()->filterByTruthyValue ($ expr ),
@@ -3704,15 +3704,13 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void {
37043704 $ ifResult = $ this ->processExprNode ($ stmt , $ expr ->if , $ ifTrueScope , $ nodeCallback , $ context );
37053705 $ throwPoints = array_merge ($ throwPoints , $ ifResult ->getThrowPoints ());
37063706 $ impurePoints = array_merge ($ impurePoints , $ ifResult ->getImpurePoints ());
3707- $ isAlwaysTerminating = $ isAlwaysTerminating || $ ifResult ->isAlwaysTerminating ();
37083707 $ ifTrueScope = $ ifResult ->getScope ();
37093708 $ ifTrueType = $ ifTrueScope ->getType ($ expr ->if );
37103709 }
37113710
37123711 $ elseResult = $ this ->processExprNode ($ stmt , $ expr ->else , $ ifFalseScope , $ nodeCallback , $ context );
37133712 $ throwPoints = array_merge ($ throwPoints , $ elseResult ->getThrowPoints ());
37143713 $ impurePoints = array_merge ($ impurePoints , $ elseResult ->getImpurePoints ());
3715- $ isAlwaysTerminating = $ isAlwaysTerminating || $ elseResult ->isAlwaysTerminating ();
37163714 $ ifFalseScope = $ elseResult ->getScope ();
37173715
37183716 $ condType = $ scope ->getType ($ expr ->cond );
@@ -4806,7 +4804,7 @@ private function processArrowFunctionNode(
48064804 $ nodeCallback (new InArrowFunctionNode ($ arrowFunctionType , $ expr ), $ arrowFunctionScope );
48074805 $ exprResult = $ this ->processExprNode ($ stmt , $ expr ->expr , $ arrowFunctionScope , $ nodeCallback , ExpressionContext::createTopLevel ());
48084806
4809- return new ExpressionResult ($ scope , false , $ exprResult -> isAlwaysTerminating () , $ exprResult ->getThrowPoints (), $ exprResult ->getImpurePoints ());
4807+ return new ExpressionResult ($ scope , false , false , $ exprResult ->getThrowPoints (), $ exprResult ->getImpurePoints ());
48104808 }
48114809
48124810 /**
0 commit comments