@@ -3287,7 +3287,7 @@ static function (): void {
32873287 return new ExpressionResult (
32883288 $ leftMergedWithRightScope ,
32893289 $ leftResult ->hasYield () || $ rightResult ->hasYield (),
3290- false ,
3290+ $ leftResult -> isAlwaysTerminating () || $ rightResult -> isAlwaysTerminating () ,
32913291 array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
32923292 array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
32933293 static fn (): MutatingScope => $ rightResult ->getScope ()->filterByTruthyValue ($ expr ),
@@ -3308,7 +3308,7 @@ static function (): void {
33083308 return new ExpressionResult (
33093309 $ leftMergedWithRightScope ,
33103310 $ leftResult ->hasYield () || $ rightResult ->hasYield (),
3311- false ,
3311+ $ leftResult -> isAlwaysTerminating () ,
33123312 array_merge ($ leftResult ->getThrowPoints (), $ rightResult ->getThrowPoints ()),
33133313 array_merge ($ leftResult ->getImpurePoints (), $ rightResult ->getImpurePoints ()),
33143314 static fn (): MutatingScope => $ leftMergedWithRightScope ->filterByTruthyValue ($ expr ),
@@ -3333,7 +3333,7 @@ static function (): void {
33333333 $ hasYield = $ condResult ->hasYield () || $ rightResult ->hasYield ();
33343334 $ throwPoints = array_merge ($ condResult ->getThrowPoints (), $ rightResult ->getThrowPoints ());
33353335 $ impurePoints = array_merge ($ condResult ->getImpurePoints (), $ rightResult ->getImpurePoints ());
3336- $ isAlwaysTerminating = false ;
3336+ $ isAlwaysTerminating = $ condResult -> isAlwaysTerminating () ;
33373337 } elseif ($ expr instanceof BinaryOp) {
33383338 $ result = $ this ->processExprNode ($ stmt , $ expr ->left , $ scope , $ nodeCallback , $ context ->enterDeep ());
33393339 $ scope = $ result ->getScope ();
@@ -3366,7 +3366,7 @@ static function (): void {
33663366 true ,
33673367 );
33683368 $ hasYield = $ result ->hasYield ();
3369- $ isAlwaysTerminating = false ;
3369+ $ isAlwaysTerminating = $ result -> isAlwaysTerminating () ;
33703370 $ scope = $ result ->getScope ()->afterExtractCall ();
33713371 } elseif ($ expr instanceof Expr \Print_) {
33723372 $ result = $ this ->processExprNode ($ stmt , $ expr ->expr , $ scope , $ nodeCallback , $ context ->enterDeep ());
0 commit comments