Skip to content

incorrect inferred type mixed~non-empty-array #13628

@claudepache

Description

@claudepache

Bug report

See code snippet. Maybe PHPStan got confused when unioning complex substractable types?
The expected dumped type on line 9 should not exclude non-empty arrays.

Code snippet that reproduces the problem

https://phpstan.org/r/2488a5b9-e936-461c-b4dd-64d91ea36f7a

Expected output

No “function.impossibleType” error on line 10

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