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
Since for example Vararg{Any,Int} throws an error during construction, would it be possible to take advantage of the fact that the N parameter in a Vararg is always an Int in type inference? It would be nice if the following inferred more precisely:
julia>f(::NTuple{N}) where {N} = N
f (generic function with 1 method)
julia>code_warntype(f, Tuple{Tuple})
Variables
#self#::Core.Compiler.Const(f, false)#unused#::Tuple{Vararg{T,N}} where T where N
Body::Any1 ─ return$(Expr(:static_parameter, 1))
Sorry if there is an issue about this already, but I couldn't find one.
The text was updated successfully, but these errors were encountered:
Since for example
Vararg{Any,Int}
throws an error during construction, would it be possible to take advantage of the fact that theN
parameter in aVararg
is always anInt
in type inference? It would be nice if the following inferred more precisely:Sorry if there is an issue about this already, but I couldn't find one.
The text was updated successfully, but these errors were encountered: