From 25416a4e71200bc82b57aabfdd922d2e4cfc73ee Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Mon, 9 Sep 2024 15:08:29 +0100
Subject: [PATCH] Do not use new propertnames in fixing

---
 src/variables.jl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/variables.jl b/src/variables.jl
index d5ddbe2..297b161 100644
--- a/src/variables.jl
+++ b/src/variables.jl
@@ -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...)
-- 
GitLab