Skip to content

Type parsing when combinding nullable and consts-types #124

@puggan

Description

@puggan

Bug report

Using nullable ? on Consts-types isn't parsed as expected

Code snippet that reproduces the problem

https://phpstan.org/r/d9e3f9e8-eca3-4380-8dda-ecf015d6a322

image

Expected output

No error, expected type ?Currency::CURRENCY_* and null|Currency::CURRENCY_* to be equal.

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

Happy as in "Yes, catched that before commitin/pushing/deploying it"

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