Skip to content

Incorrect RedundantCondition with null safe property access and null coalesce #10316

@tux-rampage

Description

@tux-rampage

When accessing properties/methods with the null safe operator, the result seems to be evaluated incorrectly.
The resulting type should be <Type>|null, but psalm evaluates only <Type>.

https://psalm.dev/r/14b17f9fa4

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