diff --git a/src/compiler.jl b/src/compiler.jl index cf8a5406bf..4a38cdc9de 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -6563,11 +6563,11 @@ end prev = getfield(x, i) next = getfield(y, i) ST = Core.Typeof(prev) - if !mutable_register(ST) - recursive_add(prev, next, f, forcelhs) - elseif !(ST <: Integer) + if mutable_register(ST) && !(ST <: Integer) recursive_accumulate(prev, next, f) prev + else + recursive_add(prev, next, f, forcelhs) end end) end