Skip to content

Non-generic child not compatible with generic parent #11354

@calebdw

Description

@calebdw

Bug report

Hello!

This issue was raised in Larastan and I was able to replicate it in the PHPStan sandbox.

Code snippet that reproduces the problem

https://phpstan.org/r/4baca60a-d370-46f7-be22-484c603754ab

Expected output

I would expect the Regions collection to be compatible as it does specify the inner types

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

Always :)

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