Is there a rationale for the failure here:
julia> Val(Int)
Val{Int64}()
julia> Val((Int,))
ERROR: TypeError: in Type, in parameter, expected Type, got a value of type Tuple{DataType}
Stacktrace:
[1] Val(x::Tuple{DataType})
@ Base ./essentials.jl:1002
[2] top-level scope
@ REPL[2]:1
FTR I think a workaround is to wrap with some parametric type, e.g., with Tuple
. So, to give a specific example, Val(Tuple{Int,String})
works, but Val((Int, String))
doesn’t.