Skip to content

Type instability when zipping more than 7 arrays #26765

@bramtayl

Description

@bramtayl
x = zip([1], ["a"], [1.0], [1], ["a"], [1.0], [1], ["a"])
z = Iterators.filter(x -> x[1] == 1, x)
@code_warntype first(z)

I spent forever tracking down what was going on here. It seems like because states for zip are nested tuples, at a certain point it just becomes too meta for type inference?. Seems like an easy solution is a zip which is based on a tuple of arrays, not recursive zip objects? Hard solution is to get it to infer all the way down...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions