Hi! Yet more explorations regarding inference and varargs/tuple
arguments.
I have a function taking a tuple of vectors, and I need a way to
extract the element types of each of them, in order to create a Dict.
The following code works fine, but inference is not able to compute T
at compile time:
function f(x::Tuple)
T = Tuple{map(eltype, x)...}
Dict{T,Int}()
end
@code_warntype f(([1,2], [1.,2.],))
The same happens with varargs, i.e. f(x...).
Is there any solution to this (other than generated functions)? Am I
missing an existing bug report again?
Thanks!