Skip to content

Commit b38a06f

Browse files
committed
Parenthesize sum arguments properly
1 parent ccf399b commit b38a06f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/stdstr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ end
138138

139139
function to_std_str(arg::ir.PartialSum)
140140
if arg.dim == 1
141-
return "vec(1)ᵀ" * to_std_str(arg.arg)
141+
return "vec(1)ᵀ" * parenthesize(to_std_str, arg.arg)
142142
elseif arg.dim == 2
143-
return to_std_str(arg.arg) * "vec(1)"
143+
return parenthesize(to_std_str, arg.arg) * "vec(1)"
144144
end
145145

146146
throw(RuntimeError("Encountered a sum over an unsupported index"))

0 commit comments

Comments
 (0)