RvSpectML/EchelleCCFs.jl

cannot pass named tuples into `fieldtypes()`?

hematthi opened this issue · 2 comments

function add_tuple_sum(x::NT, y::NT) where { NT<:NamedTuple }
@assert all(fieldtypes(x) .== fieldtypes(y))

I get a method error (no method matching fieldtypes(::NamedTuple))...

Also I get no methods for fieldvalues (UndefVarError; maybe this is in some package I don't know?):

values_of_x = fieldvalues(x)
values_of_y = fieldvalues(y)

namedtuple should be NamedTuple?

nt = namedtuple(names_of_values, values )