-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map(+, 1, (1, 2, 3)) succeeds #20930
Labels
domain:collections
Data structures holding multiple items, e.g. sets
kind:bug
Indicates an unexpected problem or unintended behavior
Comments
I think this is essentially the same issue: for custom iterators, immutable FooIterator end
Base.start(::FooIterator) = 1
Base.next(::FooIterator,st) = st,st+1
Base.done(::FooIterator,st) = st ≥ 3
Base.length(::FooIterator) = 2
Base.eltype(::FooIterator) = Int
map((x,y)->x,[0.,0.,1.],FooIterator()) # succeeds |
Ref. #20499, especially #20499 (comment). |
Not currently a bug, just how map and zip are currently defined in v1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
domain:collections
Data structures holding multiple items, e.g. sets
kind:bug
Indicates an unexpected problem or unintended behavior
... returning
Vector{Int}(2)
. A consequence ofzip
's truncation behavior and the absence of an argument shape check in the entry point tomap
I imagine? Should this behavior change? Best!The text was updated successfully, but these errors were encountered: