From 0032322ea8e4f93f9fc6b7879b5e4bbb5f56c078 Mon Sep 17 00:00:00 2001 From: metagn Date: Wed, 26 Apr 2023 09:02:44 +0300 Subject: fix #21727 (#21729) --- tests/template/taliassyntax.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/template/taliassyntax.nim b/tests/template/taliassyntax.nim index 969a9d144..2d8237d93 100644 --- a/tests/template/taliassyntax.nim +++ b/tests/template/taliassyntax.nim @@ -61,3 +61,14 @@ block: # issue #13515 if not test: doAssert false x + +import macros + +block: # issue #21727 + template debugAnnotation(s: typed): string = + astToStr s + + macro cpsJump(x: int): untyped = + result = newLit(debugAnnotation(cpsJump)) + + doAssert cpsJump(13) == "cpsJump" -- cgit 1.4.1-2-gfad0