diff --git a/src/overdub.jl b/src/overdub.jl index 3ca8b34..eeec726 100644 --- a/src/overdub.jl +++ b/src/overdub.jl @@ -660,5 +660,8 @@ macro roughly expands to `Cassette.recurse(ctx, () -> expression)`. See also: [`overdub`](@ref), [`recurse`](@ref) """ macro overdub(ctx, expr) + if Base.Meta.isexpr(expr, :(=)) + return Expr(:(=), esc(expr.args[1]), :(@overdub($(esc(ctx)), $(esc(expr.args[2]))))) + end return :(recurse($(esc(ctx)), () -> $(esc(expr)))) end