Skip to content

Difference between isset($neverNull) and isset(neverNull()) #9949

@arthur-olafsson

Description

@arthur-olafsson

When calling isset() on something with a non-null type, the resulting type can only be true. Psalm infers this correctly if passed a variable, but not if it's an expression with a clear type:

https://psalm.dev/r/98dcaa0a87

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions