Skip to content

Strict comparison + nullsafe operator + and @assert does not infer the right type #12866

@nikophil

Description

@nikophil

Bug report

Hello,

not sure this is a bug, but is seems to me the last case should also correctly understand $i is a A?

Code snippet that reproduces the problem

https://phpstan.org/r/e4b92f0f-ec6e-42a8-aba9-0ab6fd4c927d

Expected output

last example should also display Dumped type: A

Did PHPStan help you today? Did it make you happy in any way?

<3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions