@@ -3381,7 +3381,7 @@ static function (): void {
3381
3381
$ result = $ this ->processExprNode ($ stmt , $ expr ->expr , $ scope , $ nodeCallback , $ context ->enterDeep ());
3382
3382
$ throwPoints = $ result ->getThrowPoints ();
3383
3383
$ impurePoints = $ result ->getImpurePoints ();
3384
- $ isAlwaysTerminating = true ;
3384
+ $ isAlwaysTerminating = $ result -> isAlwaysTerminating () ;
3385
3385
$ hasYield = $ result ->hasYield ();
3386
3386
3387
3387
$ exprType = $ scope ->getType ($ expr ->expr );
@@ -3749,7 +3749,7 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void {
3749
3749
$ scope = $ keyResult ->getScope ();
3750
3750
$ throwPoints = $ keyResult ->getThrowPoints ();
3751
3751
$ impurePoints = array_merge ($ impurePoints , $ keyResult ->getImpurePoints ());
3752
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ keyResult ->isAlwaysTerminating ();
3752
+ $ isAlwaysTerminating = $ keyResult ->isAlwaysTerminating ();
3753
3753
}
3754
3754
if ($ expr ->value !== null ) {
3755
3755
$ valueResult = $ this ->processExprNode ($ stmt , $ expr ->value , $ scope , $ nodeCallback , $ context ->enterDeep ());
@@ -4027,7 +4027,7 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void {
4027
4027
$ hasYield = $ classResult ->hasYield ();
4028
4028
$ throwPoints = $ classResult ->getThrowPoints ();
4029
4029
$ impurePoints = $ classResult ->getImpurePoints ();
4030
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ classResult ->isAlwaysTerminating ();
4030
+ $ isAlwaysTerminating = $ classResult ->isAlwaysTerminating ();
4031
4031
}
4032
4032
if ($ expr ->getName () instanceof Expr) {
4033
4033
$ nameResult = $ this ->processExprNode ($ stmt , $ expr ->getName (), $ scope , $ nodeCallback , ExpressionContext::createDeep ());
@@ -4048,7 +4048,7 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void {
4048
4048
$ hasYield = $ classResult ->hasYield ();
4049
4049
$ throwPoints = $ classResult ->getThrowPoints ();
4050
4050
$ impurePoints = $ classResult ->getImpurePoints ();
4051
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ classResult ->isAlwaysTerminating ();
4051
+ $ isAlwaysTerminating = $ classResult ->isAlwaysTerminating ();
4052
4052
}
4053
4053
} elseif ($ expr instanceof Node \Scalar) {
4054
4054
$ hasYield = false ;
0 commit comments