Skip to content

Misleading message when calling method on never type. #2298

@adaamz

Description

@adaamz

Bug report

In example code there really something smell, but phpstan says that cannot call method on array.

Code snippet that reproduces the problem

https://phpstan.org/r/ec54301e-c83b-4796-a7df-a5b13b9d4aee

Expected output

Cannot call method on *never*.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions