Skip to content

property_exists cannot narrow type when property is a union #13304

@liamduckett

Description

@liamduckett

Bug report

Hey, very similar to #13272 but for properties, instead of methods.

Code snippet that reproduces the problem

https://phpstan.org/r/b1efdbe0-20ef-48a3-8f52-38af51bd694d

Expected output

I'd expect there to be no output.

Did PHPStan help you today? Did it make you happy in any way?

Of course!

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