Skip to content

Issue with generics and intersection #5336

@VincentLanglet

Description

@VincentLanglet

Bug report

Code snippet that reproduces the problem

Hi @ondrejmirtes, I think there is an issue with intersection type and generics.

I try to resume my issue to
https://phpstan.org/r/bd1b6893-67cf-41e9-adc9-5183abf17aff
And I think it can be reduce to
https://phpstan.org/r/50a48b2b-dcdc-4bd2-b8ed-755de7abe955

Seems like $query is ProxyQueryInterface&Stub, but the pager consider it as ProxyQueryInterface only.

Expected output

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions