Skip to content

Unreachable statement - nullable #9141

@jakubstach

Description

@jakubstach

Bug report

IMHO if ?DateTimeImmutable > DateTimeImmutable then it is not nullable so this error shouldnt be reported.

Code snippet that reproduces the problem

https://phpstan.org/r/cbe2d554-3d64-4178-b3f2-5be277eacde1

Expected output

Not reporting this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions