Skip to content

Nullable boolean in match expression resolves to never after false arm #9457

@axlon

Description

@axlon

Bug report

PHPStan seems to handle nullable booleans in a match expression differently depending on if an arm is true or false. If an arm checks for false the leftover value is never

Code snippet that reproduces the problem

https://phpstan.org/r/ae62413b-c27f-422e-8fa5-22802322b0a4

Expected output

No error

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions