summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndrey R (cooldome) <ariabushenko@gmail.com>2020-11-24 11:53:55 +0000
committerAndrey R (cooldome) <ariabushenko@gmail.com>2020-11-24 11:53:55 +0000
commitf8b9d8c1904c662f07e5ee1138357695a1df9ac3 (patch)
treef97bcbfa70eb953dda64ee490a720e752ddad300
parent823a71380d9c52c224669fe0dfcf5601619978bd (diff)
downloadNim-f8b9d8c1904c662f07e5ee1138357695a1df9ac3.tar.gz
fix #16110
-rw-r--r--tests/macros/tgetimpl.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/macros/tgetimpl.nim b/tests/macros/tgetimpl.nim
index d231a4336..54fd2b3e5 100644
--- a/tests/macros/tgetimpl.nim
+++ b/tests/macros/tgetimpl.nim
@@ -65,3 +65,22 @@ macro check_gen_proc(ex: typed): (bool, bool) =
 let a = @[1,2,3]
 assert: check_gen_proc(len(a)) == (false, true)
 
+
+
+#---------------------------------------------------------------
+# issue #16110
+
+macro check(x: type): untyped =
+  let z = getType(x)
+  let y = getImpl(z[1])
+  echo z.treeRepr
+  expectKind(z[1], nnkSym)
+  expectKind(y[0], nnkSym)
+  doAssert(y[0] == z[1])
+
+type
+  TirePtr = ptr object
+    code: int
+
+var z: TirePtr
+check(typeof(z[]))
\ No newline at end of file