@@ -3153,15 +3153,27 @@ static function (): void {
3153
3153
$ throwPoints = $ result ->getThrowPoints ();
3154
3154
$ impurePoints = $ result ->getImpurePoints ();
3155
3155
} elseif ($ expr instanceof Expr \ClassConstFetch) {
3156
- $ hasYield = false ;
3157
- $ throwPoints = [];
3158
- $ impurePoints = [];
3159
3156
if ($ expr ->class instanceof Expr) {
3160
3157
$ result = $ this ->processExprNode ($ stmt , $ expr ->class , $ scope , $ nodeCallback , $ context ->enterDeep ());
3161
3158
$ scope = $ result ->getScope ();
3162
3159
$ hasYield = $ result ->hasYield ();
3163
3160
$ throwPoints = $ result ->getThrowPoints ();
3164
3161
$ impurePoints = $ result ->getImpurePoints ();
3162
+ } else {
3163
+ $ hasYield = false ;
3164
+ $ throwPoints = [];
3165
+ $ impurePoints = [];
3166
+ $ nodeCallback ($ expr ->class , $ scope );
3167
+ }
3168
+
3169
+ if ($ expr ->name instanceof Expr) {
3170
+ $ result = $ this ->processExprNode ($ stmt , $ expr ->name , $ scope , $ nodeCallback , $ context ->enterDeep ());
3171
+ $ scope = $ result ->getScope ();
3172
+ $ hasYield = $ hasYield || $ result ->hasYield ();
3173
+ $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
3174
+ $ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
3175
+ } else {
3176
+ $ nodeCallback ($ expr ->name , $ scope );
3165
3177
}
3166
3178
} elseif ($ expr instanceof Expr \Empty_) {
3167
3179
$ nonNullabilityResult = $ this ->ensureNonNullability ($ scope , $ expr ->expr );
0 commit comments