Hi all,
Can anyone explain why the following works:
Val{(:a,:b,:c)}()
but this does not?
Val{(:a,:b,(:c,:d))}()
ERROR: TypeError: in Type, in parameter, expected Type, got a value of type Tuple{Symbol, Symbol, Tuple{Symbol, Symbol}}
Stacktrace:
[1] top-level scope
@ REPL[77]:1
At first, I thought maybe the problem was the nested tuple, but this works fine:
Val{(:a,:b,(1,2))}()
So what’s up with this? I don’t really see the logical reason why sometimes tuple values are allowed in type arguments, and sometimes they are not?
ComponentArrays
also seems to somehow get away with this, since all of the axis information is stored as named tuples in Axis
. Maybe @jonniedie could provide some insight here?