Skip to content

nullable conditional parameter using enum leads to imprecise value #13782

@staabm

Description

@staabm

Bug report

no errors in the snippet.

at a minimum it could report int instead of int|string on line 36

Code snippet that reproduces the problem

https://phpstan.org/r/f00413fa-9f10-40f4-8d7e-9342f873a9a3

Expected output

no assertion errors

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