Skip to content

Commit ed02bf4

Browse files
authored
Handle more general type unstable setfield (#2300)
1 parent 4bdccb6 commit ed02bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/typeunstablerules.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ end
18341834
function rt_jl_setfield_rev(dptr::T, idx, ::Val{isconst}, val, dval) where {T,isconst}
18351835
RT = Core.Typeof(val)
18361836
if active_reg(RT) && !isconst
1837-
dval[] += getfield(dptr, idx)
1837+
dval[] = recursive_add(dval[], getfield(dptr, idx), identity, guaranteed_nonactive)
18381838
setfield!(dptr, idx, make_zero(val))
18391839
end
18401840
end

0 commit comments

Comments
 (0)