Configurations.jl icon indicating copy to clipboard operation
Configurations.jl copied to clipboard

type alias does not work on parametric types

Open Roger-luo opened this issue 4 years ago • 1 comments

e.g

@option "aaa" struct OptionA{T}
   a::T
end

@option "bbb" struct OptionB{T}
   b::T
end

@option struct OptionC
   c::Union{OptionA, OptionB}
end

will result in not concrete type error when parsing back, due to the lack of information to determine T in type alias.

Roger-luo avatar Oct 09 '21 06:10 Roger-luo

One way to support this is to ask user to overload type_alias for different parametric type. And maybe overload another for parsing it back. Should check StructTypes.jl for this

Roger-luo avatar Oct 29 '21 05:10 Roger-luo