Skip to content

FP: psychotic edge case with PhpDoc certainty and objects #2945

@dktapps

Description

@dktapps

Bug report

This bug is hard to explain, so I'll let the code do the talking.

Code snippet that reproduces the problem

Broken: https://phpstan.org/r/1e0600d0-cb1a-490f-a3e5-212f22fcbac3
Working: https://phpstan.org/r/48aaeb3f-2b87-4e93-ab56-34a6b36d3fc0

In both cases treatPhpDocTypesAsCertain is disabled. However, this particular error doesn't go away.

Expected output

No error should be reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions