Open
Description
This works:
julia> struct Bar{T}
end
julia> struct FooWithoutUnion
x::Int
end
julia> Bar{FooWithoutUnion(1)}
Bar{FooWithoutUnion(1)}
this doesnt:
julia> struct FooWithUnion
x::Union{Int, Nothing}
end
julia> Bar{FooWithUnion(1)}
ERROR: TypeError: in Type, in parameter, expected Type, got FooWithUnion
Stacktrace:
[1] top-level scope at REPL[20]:1
Now that we treat unions of bitstypes basically as good as bitstypes it seems to me that there is no reason to disallow the latter.