You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Test
# wrapper is pretty much irrelevant for the problem, just to make an MWE@inlinewrapper(itrs) =sum(prod(first.(i)) for i in Iterators.product(itrs...))
zipped1(pairs) =wrapper(map(pair ->zip(pair...), pairs))
zipped2(pairs) =wrapper(map(pair ->zip(pair[1], pair[2]), pairs))
pairs = (1:5=>1:5, 2:3=>2:3)
@inferredzipped1(pairs) # ERROR: return type Int64 does not match inferred return type Any@inferredzipped2(pairs) # inferred correctly
I found some similar-looking issues, but this did not look like a duplicate of any of them.
The text was updated successfully, but these errors were encountered:
JeffBezanson
changed the title
map(a -> zip(a...), itr) does not infer correctly
map(a -> zip(a...), itr) inference imprecision
Oct 29, 2019
This wasn't quite a duplicate of #29114 (which was mostly about inlining not inference). But in any case, it got fixed by the recent inference precision enhancements.
MWE condensed from discussion:
I found some similar-looking issues, but this did not look like a duplicate of any of them.
The text was updated successfully, but these errors were encountered: