Skip to content

Return type wrongly identified #4339

@mmarton

Description

@mmarton

Bug report

I get "Anonymous function should return '-' but returns string." message for the following code

Code snippet that reproduces the problem

https://phpstan.org/r/eb2e8006-e5ef-47b2-a210-d5c442fee178

Expected output

nothing. this was working in the previous version (0.12.64), error reported only in the latest one (0.12.65)

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