From 58bb575f5fe94388be4109800d88f7793d643d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 6 Oct 2023 14:05:29 +0200 Subject: [PATCH] Minor refactor with _is_sum --- src/rewrite_generic.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rewrite_generic.jl b/src/rewrite_generic.jl index 2c1a06d0..64aa5f56 100644 --- a/src/rewrite_generic.jl +++ b/src/rewrite_generic.jl @@ -69,7 +69,7 @@ function _rewrite_generic(stack::Expr, expr::Expr) # If the first argument is a splat. return esc(expr), false elseif _is_generator(expr) || _is_flatten(expr) || _is_parameters(expr) - if !(expr.args[1] in (:sum, :Σ, :∑)) + if !_is_sum(expr.args[1]) # We don't know what this is. Return the expression and don't let # future callers mutate. return esc(expr), false