@@ -3159,9 +3159,6 @@ static function (): void {
3159
3159
$ throwPoints = $ result ->getThrowPoints ();
3160
3160
$ impurePoints = $ result ->getImpurePoints ();
3161
3161
} elseif ($ expr instanceof Expr \ClassConstFetch) {
3162
- $ hasYield = false ;
3163
- $ throwPoints = [];
3164
- $ impurePoints = [];
3165
3162
if ($ expr ->class instanceof Expr) {
3166
3163
$ result = $ this ->processExprNode ($ stmt , $ expr ->class , $ scope , $ nodeCallback , $ context ->enterDeep ());
3167
3164
$ scope = $ result ->getScope ();
@@ -3174,6 +3171,16 @@ static function (): void {
3174
3171
$ impurePoints = [];
3175
3172
$ nodeCallback ($ expr ->class , $ scope );
3176
3173
}
3174
+
3175
+ if ($ expr ->name instanceof Expr) {
3176
+ $ result = $ this ->processExprNode ($ stmt , $ expr ->name , $ scope , $ nodeCallback , $ context ->enterDeep ());
3177
+ $ scope = $ result ->getScope ();
3178
+ $ hasYield = $ hasYield || $ result ->hasYield ();
3179
+ $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
3180
+ $ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
3181
+ } else {
3182
+ $ nodeCallback ($ expr ->name , $ scope );
3183
+ }
3177
3184
} elseif ($ expr instanceof Expr \Empty_) {
3178
3185
$ nonNullabilityResult = $ this ->ensureNonNullability ($ scope , $ expr ->expr );
3179
3186
$ scope = $ this ->lookForSetAllowedUndefinedExpressions ($ nonNullabilityResult ->getScope (), $ expr ->expr );
0 commit comments