Skip to content

Types using static<...> in a return type are resolved against the wrong class #12575

@stof

Description

@stof

Bug report

The static type seems to be resolved based on the type of the caller instead of the type of the callee

Code snippet that reproduces the problem

https://phpstan.org/r/528e720b-aa7e-448d-9d02-d2f07e095e9f

Expected output

No error in the WillImplementTest

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

No response

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