You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sum_type AT beginA(common_field::Int, a::Bool, b::Int)
B(common_field::Int, a::Int, b::Float64, d::Complex)
C(common_field::Int, b::Float64, d::Bool, e::Float64, k::Complex{Real})
D(common_field::Int, b::Any)
end
here A, B, C and D are just "fake types" used for making constructors for sum types. But I wonder why couldn't they be alias of the variants?
const A = SumTypes.Variant{:A, (:common_field, :a, :b), Tuple{Int64, Bool, Int64}}
this way the dispatch system will become available even for sum types, which is something it would be useful for things I plan to do in MixedStructTypes, but I think it would be good in general...this shouldn't be breaking right?
The text was updated successfully, but these errors were encountered:
e.g. consider the sum type in the readme:
here
A
,B
,C
andD
are just "fake types" used for making constructors for sum types. But I wonder why couldn't they be alias of the variants?this way the dispatch system will become available even for sum types, which is something it would be useful for things I plan to do in
MixedStructTypes
, but I think it would be good in general...this shouldn't be breaking right?The text was updated successfully, but these errors were encountered: