From 2a004c1399992cfbde90d8204e7806fadb82832b Mon Sep 17 00:00:00 2001 From: Jan Weidner Date: Wed, 2 Oct 2019 17:56:23 +0200 Subject: [PATCH] remove assert_hasfields --- src/ConstructionBase.jl | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ConstructionBase.jl b/src/ConstructionBase.jl index f4605c6..3f4a788 100644 --- a/src/ConstructionBase.jl +++ b/src/ConstructionBase.jl @@ -39,15 +39,6 @@ struct NamedTupleConstructor{names} end end end -function assert_hasfields(T, fnames) - for fname in fnames - if !(fname in fieldnames(T)) - msg = "$T has no field $fname" - throw(ArgumentError(msg)) - end - end -end - function setproperties(obj; kw...) setproperties(obj, (;kw...)) end