Skip to content

False positive: Using nullsafe property access on non-nullable type #7109

@schlndh

Description

@schlndh

Bug report

It seems that phpstan 1.6 gets confused when using ?-> together with ?? and complains about ?-> even when the left side of it is indeed nullable.

Code snippet that reproduces the problem

https://phpstan.org/r/b9aade5f-f220-4b10-934f-dd6338acfe05

Expected output

No issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions