@@ -2213,7 +2213,7 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
22132213 $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
22142214 } elseif ($ expr instanceof Expr \NullsafeMethodCall) {
22152215 $ nonNullabilityResult = $ this ->ensureShallowNonNullability ($ scope , $ scope , $ expr ->var );
2216- $ exprResult = $ this ->processExprNode (new MethodCall ($ expr ->var , $ expr ->name , $ expr ->args , $ expr ->getAttributes ()), $ nonNullabilityResult ->getScope (), $ nodeCallback , $ context );
2216+ $ exprResult = $ this ->processExprNode (new MethodCall ($ expr ->var , $ expr ->name , $ expr ->args , array_merge ( $ expr ->getAttributes (), [ ' virtualNullsafeMethodCall ' => true ] )), $ nonNullabilityResult ->getScope (), $ nodeCallback , $ context );
22172217 $ scope = $ this ->revertNonNullability ($ exprResult ->getScope (), $ nonNullabilityResult ->getSpecifiedExpressions ());
22182218
22192219 return new ExpressionResult (
@@ -2368,7 +2368,7 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
23682368 }
23692369 } elseif ($ expr instanceof Expr \NullsafePropertyFetch) {
23702370 $ nonNullabilityResult = $ this ->ensureShallowNonNullability ($ scope , $ scope , $ expr ->var );
2371- $ exprResult = $ this ->processExprNode (new PropertyFetch ($ expr ->var , $ expr ->name , $ expr ->getAttributes ()), $ nonNullabilityResult ->getScope (), $ nodeCallback , $ context );
2371+ $ exprResult = $ this ->processExprNode (new PropertyFetch ($ expr ->var , $ expr ->name , array_merge ( $ expr ->getAttributes (), [ ' virtualNullsafePropertyFetch ' => true ] )), $ nonNullabilityResult ->getScope (), $ nodeCallback , $ context );
23722372 $ scope = $ this ->revertNonNullability ($ exprResult ->getScope (), $ nonNullabilityResult ->getSpecifiedExpressions ());
23732373
23742374 return new ExpressionResult (
0 commit comments