From 0442058404c6480c7d9bb690f8429d75004a8eab Mon Sep 17 00:00:00 2001 From: rafaqz Date: Sat, 1 Jun 2024 00:21:53 +0200 Subject: [PATCH] use a tuple instead of Ref in broadcasts --- src/ConstructionBase.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ConstructionBase.jl b/src/ConstructionBase.jl index ee2f771..ba31236 100644 --- a/src/ConstructionBase.jl +++ b/src/ConstructionBase.jl @@ -102,11 +102,11 @@ tuple_or_ntuple(::Type, names, vals) = error("Only Int and Symbol propertynames if VERSION >= v"1.7" function getproperties(obj) fnames = propertynames(obj) - tuple_or_ntuple(fnames, getproperty.(Ref(obj), fnames)) + tuple_or_ntuple(fnames, getproperty.((obj,), fnames)) end function getfields(obj::T) where {T} fnames = fieldnames(T) - NamedTuple{fnames}(getfield.(Ref(obj), fnames)) + NamedTuple{fnames}(getfield.((obj,), fnames)) end else @generated function getfields(obj)