Skip to content

iterable is equal to array|Traversable #13247

@azjezz

Description

@azjezz

Bug report

iterable<K, V> is an alias for array<K, V>|Traversable<K, V>, therefore, an expression of type iterable<K, V> should be allowed as an argument to a parameter of type array<K, V>|Traversable<K, V>.

Code snippet that reproduces the problem

https://phpstan.org/r/31665602-43e6-4f33-b23f-7c6a1f282e13

Expected output

No issues

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