Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type alias does not work on parametric types #54

Open
Roger-luo opened this issue Oct 9, 2021 · 1 comment
Open

type alias does not work on parametric types #54

Roger-luo opened this issue Oct 9, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@Roger-luo
Copy link
Owner

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 Roger-luo added the bug Something isn't working label Oct 9, 2021
@Roger-luo
Copy link
Owner Author

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 Roger-luo added this to the v1.0.0 milestone Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant