Skip to content

treatPhpDocTypesAsCertain + strict-rules casting bug #3760

@dktapps

Description

@dktapps

Bug report

I don't really know how to explain this, so I hope the code samples are sufficient...

Code snippet that reproduces the problem

With treatPhpDocTypesAsCertain: false: https://phpstan.org/r/0b970edc-56b4-4aa3-8d8a-d506d04aa484
With treatPhpDocTypesAsCertain: true: https://phpstan.org/r/959f59d6-7032-4782-a353-aebfb95d0b4b

Expected output

The first test case should report zero errors.

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