Skip to content

Regarding the analysis of the return value of range() #9573

@keibass

Description

@keibass

Bug report

When attempting to assign the return value of range() to a property marked as list, a type mismatch error is reported.
However, $count is confirmed to be positive-int, and the return value of range() should definitely be list.

#9572

Code snippet that reproduces the problem

https://phpstan.org/r/133e0fc4-a35e-4546-bbc0-d49efe4a70c3

Expected output

No error

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