summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-09-22 14:56:40 +0300
committerGitHub <noreply@github.com>2024-09-22 13:56:40 +0200
commit7da2ffb7513192ccfd29f62eed613298b3a6f6f4 (patch)
treef8cb79b1af4400eb89ce722860645ef31e780d2d /tests
parent5c843d3d60982bb0669107ee67863737f52574ba (diff)
downloadNim-7da2ffb7513192ccfd29f62eed613298b3a6f6f4.tar.gz
fix custom pragma with backticks not working [backport] (#24151)
refs https://forum.nim-lang.org/t/12522
Diffstat (limited to 'tests')
-rw-r--r--tests/pragmas/tcustom_pragma.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim
index 9ffa9a33d..11a6df813 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -531,3 +531,10 @@ block:
check(a)
check(b)
+
+block: # https://forum.nim-lang.org/t/12522, backticks
+ template `mypragma`() {.pragma.}
+ # Error: invalid pragma: `mypragma`
+ type Test = object
+ field {.`mypragma`.}: int
+ doAssert Test().field.hasCustomPragma(mypragma)