Skip to content
Snippets Groups Projects
Unverified Commit 25416a4e authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Do not use new propertnames in fixing

parent cc1a188c
No related branches found
No related tags found
1 merge request!7Add variables as properties
......@@ -23,9 +23,9 @@ Parent type of all components, building block, and sequences that form an MRI se
"""
abstract type AbstractBlock end
function fixed(ab::AbstractBlock)
function fixed(ab::T) where {T<:AbstractBlock}
params = []
for prop_name in propertynames(ab)
for prop_name in fieldnames(T)
push!(params, fixed(getproperty(ab, prop_name)))
end
return typeof(ab)(params...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment