Skip to content

Match expression against get_class of union type behaves wrong #8536

@icanhazstring

Description

@icanhazstring

Bug report

Trying to match against get_class of union type does not work as expected.
This seems to be related to these (and was maybe fixed already?) but is not really working anymore.

#5371
#7698

Code snippet that reproduces the problem

https://phpstan.org/r/b7c1a0e5-9037-4088-b5dd-20b3c07cc2f9

Expected output

No output expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions