is only inferred weakly to be Vector{Union{Int,Char,Float64}}.
This is annoying, since broadcast(first,qq) is inferred better.
What should I define to help type-inference? Making broadcast(getindex,qq,Val{1}) accurately inferred is also sufficient (as without knowing the value 1 at compile-time there is actually no way to know which tuple element is chosen).
This can be useful in cases where a record is parsed into a multi-typed tuple.
but the problem is not with the return type, but with the inferred return type i.e.
@code_warntype broadcast(getindex,qq,1)
is Vector{Union{Int64,Char,Float64}} but broadcast(first,qq) has Vector{Int64} in @code_warntype and I want broadcast(getindex,qq,Val{1}) to do the same.