summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authorSirOlaf <34164198+SirOlaf@users.noreply.github.com>2023-09-17 20:03:43 +0200
committerGitHub <noreply@github.com>2023-09-17 20:03:43 +0200
commitfcf4c1ae172080b8ef00b173977c223836bdebf2 (patch)
tree17dc442149f956d9281511565fa4b9869a3cc1fa /tests/pragmas
parent8836207a4e68c177d5059131df05a9d433dd3c8d (diff)
downloadNim-fcf4c1ae172080b8ef00b173977c223836bdebf2.tar.gz
Fix #22713: Make size unknown for tyForward (#22714)
Close #22713

---------

Co-authored-by: SirOlaf <>
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/t22713.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pragmas/t22713.nim b/tests/pragmas/t22713.nim
new file mode 100644
index 000000000..3d3384632
--- /dev/null
+++ b/tests/pragmas/t22713.nim
@@ -0,0 +1,12 @@
+import std/macros
+
+
+template myPragma(x: int) {.pragma.}
+
+type
+  A = object
+    x: int64
+
+  B {.myPragma(sizeof(A)).} = object
+
+doAssert B.getCustomPragmaVal(myPragma) == 8
\ No newline at end of file