Skip to content

Possibly null object is wrongly enforced as non null. #7980

@vdauchy

Description

@vdauchy

Bug report

phpstan v1.8.5

There is a wrong interpretation following a test on is_int($obj?->value) where $obj is now supposed to not be nullable anymore while it still can be.

Code snippet that reproduces the problem

(https://phpstan.org/r/fce84de6-4ec4-441f-b087-77af715fa72c)

Expected output

No error shall be detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions