@@ -3289,7 +3289,7 @@ static function (): void {
32893289 return new ExpressionResult (
32903290 $ leftMergedWithRightScope ,
32913291 $ leftResult ->hasYield () || $ rightResult ->hasYield (),
3292- false ,
3292+ $ leftResult -> isAlwaysTerminating () || $ rightResult -> isAlwaysTerminating () ,
32933293 array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
32943294 array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
32953295 static fn (): MutatingScope => $ rightResult ->getScope ()->filterByTruthyValue ($ expr ),
@@ -3310,7 +3310,7 @@ static function (): void {
33103310 return new ExpressionResult (
33113311 $ leftMergedWithRightScope ,
33123312 $ leftResult ->hasYield () || $ rightResult ->hasYield (),
3313- false ,
3313+ $ leftResult -> isAlwaysTerminating () ,
33143314 array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
33153315 array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
33163316 static fn (): MutatingScope => $ leftMergedWithRightScope ->filterByTruthyValue ($ expr ),
@@ -3335,7 +3335,7 @@ static function (): void {
33353335 $ hasYield = $ condResult ->hasYield () || $ rightResult ->hasYield ();
33363336 $ throwPoints = array_merge ($ condResult ->getThrowPoints (), $ rightResult ->getThrowPoints ());
33373337 $ impurePoints = array_merge ($ condResult ->getImpurePoints (), $ rightResult ->getImpurePoints ());
3338- $ isAlwaysTerminating = false ;
3338+ $ isAlwaysTerminating = $ condResult -> isAlwaysTerminating () ;
33393339 } elseif ($ expr instanceof BinaryOp) {
33403340 $ result = $ this ->processExprNode ($ stmt , $ expr ->left , $ scope , $ nodeCallback , $ context ->enterDeep ());
33413341 $ scope = $ result ->getScope ();
@@ -3368,7 +3368,7 @@ static function (): void {
33683368 true ,
33693369 );
33703370 $ hasYield = $ result ->hasYield ();
3371- $ isAlwaysTerminating = false ;
3371+ $ isAlwaysTerminating = $ result -> isAlwaysTerminating () ;
33723372 $ scope = $ result ->getScope ()->afterExtractCall ();
33733373 } elseif ($ expr instanceof Expr \Print_) {
33743374 $ result = $ this ->processExprNode ($ stmt , $ expr ->expr , $ scope , $ nodeCallback , $ context ->enterDeep ());
0 commit comments