Skip to content

Array reduce not understanding callback return with generics #8071

@BackEndTea

Description

@BackEndTea

Bug report

It seems array_reduce doesn't completely understand the return from the generics.

Code snippet that reproduces the problem

https://phpstan.org/r/e5bcd1ac-83f1-485a-98cd-0d11d1c3386f

Expected output

I expected no errors here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions