Skip to content

False positive: Access to private property $root of parent class Foo. #8333

@staabm

Description

@staabm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions