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