Skip to content

Incorrect interpretation of function return type passed as first class callable #11861

@Creeperface01

Description

@Creeperface01

Bug report

When I pass the mapping function as first class callable, phpstan probably incorrectly evaluates it's return type.

Code snippet that reproduces the problem

https://phpstan.org/r/eaa6cfdb-7500-441e-935b-521a9ec0ea3e

Expected output

Both statements should lead to the same output

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions