Skip to content

Generics and static type #3118

@amorimjuliana

Description

@amorimjuliana

Bug report

PHPStan complains about returning a subclass of a generic class that is compatible with the return type.

Code snippet that reproduces the problem

https://phpstan.org/r/df0e168c-f207-4db8-9d24-e1324e287652

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions