Skip to content

Circular definition detected where it doesn't seem to exist #5608

@morozov

Description

@morozov

Bug report

If a @psalm-type defined on a class refers to a symbol of the class itself, a circular definition is detected. As far as I can tell, there are no circular references (if this is what's implied) in the example below.

Code snippet that reproduces the problem

https://phpstan.org/r/637119c3-3925-45fd-b251-bf48d56e4c52

Expected output

No error.

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

Not today specifically but I'm definitely happy that this tool exists.

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