Skip to content

Commit 47f9a9f

Browse files
fix wrappedallcos macro for julia pre
1 parent 5c20366 commit 47f9a9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/test_allocs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ macro wrappedallocs(expr)
3333
kwargs_dict = Dict{Symbol, Any}(a.args[1] => a.args[2] for a in kwargs if a.head == :kw)
3434
quote
3535
function g($(argnames...); kwargs_dict...)
36+
$(Expr(expr.head, argnames..., kwargs...)) # Call the function twice to make the allocated macro more stable
3637
@allocated $(Expr(expr.head, argnames..., kwargs...))
3738
end
3839
$(Expr(:call, :g, [esc(a) for a in args]...))

0 commit comments

Comments
 (0)