Skip to content

Precision loss leads to error message about condition being "always true" #7111

@greg0ire

Description

@greg0ire

Bug report

I'm trying to use conditional return types, but my condition seems too complicated for PHPStan yet

Code snippet that reproduces the problem

https://phpstan.org/r/848de7f0-976d-48c2-ad2c-06aaadeb9e7a

Expected output

No errors

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

The latest version seems to allow me to get rid of some redundant asserts 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions