diff --git a/src/macroexpand.scm b/src/macroexpand.scm index e1d607885b10d..77d0fbb1781ae 100644 --- a/src/macroexpand.scm +++ b/src/macroexpand.scm @@ -414,6 +414,14 @@ (body (cadr e)) (m (caddr e))) (resolve-expansion-vars-with-new-env body env m parent-scope inarg #t))) + ((tuple) + (cons (car e) + (map (lambda (x) + (if (assignment? x) + `(= ,(unescape (cadr x)) + ,(resolve-expansion-vars-with-new-env x env m parent-scope inarg)) + (resolve-expansion-vars-with-new-env x env m parent-scope inarg))) + (cdr e)))) ;; todo: trycatch (else diff --git a/test/syntax.jl b/test/syntax.jl index 85951185f4a57..03e2498d6fa58 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1848,6 +1848,9 @@ macro id28992(x) x end @test @id28992(2 ^ -2) == 0.25 @test @id28992(2 .^ -2) == 0.25 +# issue #32121 +@test @id28992((a=1, b=2)) === (a=1, b=2) + # issue #31596 f31596(x; kw...) = x @test f31596((a=1,), b = 1.0) === (a=1,)