diff options
author | metagn <metagngn@gmail.com> | 2023-04-26 09:02:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 08:02:44 +0200 |
commit | 0032322ea8e4f93f9fc6b7879b5e4bbb5f56c078 (patch) | |
tree | 38db4e57146b57d0ee54976f9d9ac3264963522e /tests | |
parent | f0ae1ed54490bdce4f32cc7adf7ac3d85c706f3a (diff) | |
download | Nim-0032322ea8e4f93f9fc6b7879b5e4bbb5f56c078.tar.gz |
fix #21727 (#21729)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/template/taliassyntax.nim | 11 |
1 files changed, 11 insertions, 0 deletions
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" |