Skip to content

Wrong treat the enum value in value-of #9000

@zengbo

Description

@zengbo

Bug report

PHPStan: 1.9.3

I set the return enum type using value-of and expect the enum value to match the value set by value-of

Code snippet that reproduces the problem

https://phpstan.org/r/7b0f9b3e-79d5-47f9-a73d-9dd862cfa2ab

Expected output

Dumped type: A::A|A::B
Dumped type: 'A'|'B'

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

PHPStan helps us a lot!

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