Skip to content

Exhaustive switch is not recognized with shared cases #8719

@Khartir

Description

@Khartir

Bug report

I have an exhaustive switch statement that was recognized as such by PHPStan. Then two cases became the same, so they are no longer separated by a break and now PHPStan thinks the switch is no longer exhaustive.

Code snippet that reproduces the problem

https://phpstan.org/r/cd3ecb2e-b15f-413d-b64e-fcb4aa7dc59c

Expected output

No error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions