Skip to content

Converting iterable to array with iterator_to_array causes error #11007

@lgatting

Description

@lgatting

When converting iterable to array, psalm returns an error: https://psalm.dev/r/496d9d1084

To me it sounds that this shouldn't be a problem because it is equivalent to a foreach, which doesn't throw an error: https://psalm.dev/r/cc83c4dc5d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions