Skip to content

False positive with template covariant #9161

@enumag

Description

@enumag

Bug report

I'm not 100% sure but I don't think there is much of a difference between toArray and ToPairs regarding type variance, right?

Or In case the error is correct then how should I fix it? 🤔

Code snippet that reproduces the problem

https://phpstan.org/r/ccc12749-6dfd-4e0d-abf5-54dcd11e6fd6

Expected output

no error

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