Skip to content

Invalid union type check #4198

@kocsismate

Description

@kocsismate

Bug report

A project of mine currently has a weird phpstan failure (https://github.com/woohoolabs/zen/runs/1507157212?check_suite_focus=true. Based on the error message, I guess it has to do something with the order of the union type, but I also couldn't tweak the order for a successful static analysis.

Sorry if this is a known problem, I couldn't find an exact same issue.

Code snippet that reproduces the problem

https://phpstan.org/r/6d113012-ef5e-4fd1-bfc1-426c35b89124

Expected output

There shouldn't be any error reported.

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