Bug report
similar to #2435 I guess we have the same error in static context
Code snippet that reproduces the problem
https://phpstan.org/r/a757dd9c-01fa-450a-96f6-52a10feab73f
https://3v4l.org/YmKc6
see discussion in phpstan/phpstan-src#1953 (comment)
Expected output
no error like Cannot access static property $root on Bar|null.