Skip to content

"Failed to infer case value" when enum case references another enum #10560

Closed
@aurimasrim

Description

Hi,
I've encountered an issue where I get "Failed to infer case value" when a case of an enum references the value of another enum's case.

enum SomeEnum: string
{
    case SOME_VALUE = 'SOME_VALUE';
}

enum AnotherEnum: string
{
    case ANOTHER_VALUE = SomeEnum::SOME_VALUE->value;
}

https://psalm.dev/r/d4e839fc63

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions