Skip to content

Wrong hint array might not be a list while it's certainly a list #9401

@fluffycondor

Description

@fluffycondor

Bug report

https://phpstan.org/r/6d74ac96-d0e5-448e-92bb-d70c9d198495
List items type mismatch leads to an incorrect hint array might not be a list, while it's certainly a list, but a list of wrong types.

Code snippet that reproduces the problem

https://phpstan.org/r/6d74ac96-d0e5-448e-92bb-d70c9d198495

Expected output

Function foo() should return list<int<1, max>> but returns list<int<0, max>> but without the misleading hint below.

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

💝

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions