From 9e83da33056d61738c483bd089685580a1a664b4 Mon Sep 17 00:00:00 2001 From: serenity4 Date: Sun, 28 Jul 2024 14:16:46 +0200 Subject: [PATCH] Attempt to remove method on ::Type --- src/ConstructionBase.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ConstructionBase.jl b/src/ConstructionBase.jl index 95b288f..b7a4366 100644 --- a/src/ConstructionBase.jl +++ b/src/ConstructionBase.jl @@ -71,15 +71,14 @@ if VERSION >= v"1.7" end end else - properties_are_fields(obj) = properties_are_fields(typeof(obj)) - properties_are_fields(T::Type) = !is_propertynames_overloaded(T) + properties_are_fields(obj) = is_propertynames_overloaded(typeof(obj)) function is_propertynames_overloaded(T::Type)::Bool which(propertynames, Tuple{T}).sig !== Tuple{typeof(propertynames), Any} end @generated function check_properties_are_fields(obj) - if !properties_are_fields(obj) + if is_propertynames_overloaded(obj) return quote T = typeof(obj) msg = """