From 8fb0f1000380187f395258d08b727a15653cf493 Mon Sep 17 00:00:00 2001 From: William Moses Date: Tue, 19 Dec 2023 01:57:07 -0600 Subject: [PATCH] Use recursive_add for getindex (#1218) --- src/rules/typeunstablerules.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rules/typeunstablerules.jl b/src/rules/typeunstablerules.jl index e87acd6fe3..ea9edcb9b2 100644 --- a/src/rules/typeunstablerules.jl +++ b/src/rules/typeunstablerules.jl @@ -254,11 +254,11 @@ function rt_jl_getfield_rev(dptr::T, dret, ::Type{Val{symname}}, ::Val{isconst}, RT = Core.Typeof(cur) if active_reg(RT) && !isconst if length(dptrs) == 0 - setfield!(dptr, symname, cur+dret[]) + setfield!(dptr, symname, recursive_add(cur, dret[])) else - setfield!(dptr, symname, cur+dret[1][]) + setfield!(dptr, symname, recursive_add(cur, dret[1][])) for i in 1:length(dptrs) - setfield!(dptrs[i], symname, cur+dret[1+i][]) + setfield!(dptrs[i], symname, recursive_add(cur, dret[1+i][])) end end end @@ -270,11 +270,11 @@ function idx_jl_getfield_rev(dptr::T, dret, ::Type{Val{symname}}, ::Val{isconst} RT = Core.Typeof(cur) if active_reg(RT) && !isconst if length(dptrs) == 0 - setfield_idx(dptr, symname, cur+dret[]) + setfield_idx(dptr, symname, recursive_add(cur, dret[])) else - setfield_idx(dptr, symname, cur+dret[1][]) + setfield_idx(dptr, symname, recursive_add(cur, dret[1][])) for i in 1:length(dptrs) - setfield_idx(dptrs[i], symname, cur+dret[1+i][]) + setfield_idx(dptrs[i], symname, recursive_add(cur, dret[1+i][])) end end end