Open
Description
Regular type parameters can be 'curried':
julia> struct Foo{T, U, V, W} end
julia> Foo
Foo
julia> ans{1}
Foo{1}
julia> ans{2}
Foo{1, 2}
julia> ans{3}
Foo{1, 2, 3}
julia> ans{4}
Foo{1, 2, 3, 4}
But not Tuple
:
julia> Tuple
Tuple
julia> ans{Int}
Tuple{Int64}
julia> ans{String}
ERROR: TypeError: in Type{...} expression, expected UnionAll, got Type{Tuple{Int64}}
Stacktrace:
[1] top-level scope
@ REPL[37]:1
This is a kinda annoying limitation sometimes when one wants to construct types iteratively, and Tuple
is the most natural type to want to do that with, but the only one where it doesn't work.