diff --git a/src/macroexpand.scm b/src/macroexpand.scm index 12b1399bf1a22..13d8cf4104e86 100644 --- a/src/macroexpand.scm +++ b/src/macroexpand.scm @@ -340,7 +340,7 @@ ,(resolve-expansion-vars-with-new-env (caddr arg) env m parent-scope inarg)))) (else `(global ,(resolve-expansion-vars-with-new-env arg env m parent-scope inarg)))))) - ((using import export meta line inbounds boundscheck loopinfo gc_preserve gc_preserve_end) (map unescape e)) + ((using import export meta line inbounds boundscheck loopinfo) (map unescape e)) ((macrocall) e) ; invalid syntax anyways, so just act like it's quoted. ((symboliclabel) e) ((symbolicgoto) e) diff --git a/test/syntax.jl b/test/syntax.jl index e36b195fa1354..59df08b08a9a6 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2223,3 +2223,9 @@ end h35201(x; k=1) = (x, k) f35201(c) = h35201((;c...), k=true) @test f35201(Dict(:a=>1,:b=>3)) === ((a=1,b=3), true) + +# issue #35391 +macro a35391(b) + :(GC.@preserve ($(esc(b)),) ) +end +@test @a35391(0) === (0,)