Skip to content

Wrong TypeDoesNotContainNull determination #9894

@chriskapp

Description

@chriskapp

Hi, I have found also another case where Psalm thinks that in the example the $existing variable does not contain null s.

https://psalm.dev/r/74b5ec5ba5

But it could be null in case $foo is 1 and $bar is null. It looks like Psalm does not recognize the elseif and thinks that there is a standalone if which would indeed remove the null type.

Maybe this is also related to #7099

Metadata

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