summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-04-01 08:17:23 +0200
committerAraq <rumpf_a@web.de>2014-04-01 08:17:23 +0200
commit6a94ca318782de9a3bd0a20f69b5c2ecde3a0dba (patch)
treed6ec40dc1854a2268ecdc8111f28c14f568b22d3 /tests/template
parent3afb42496b1dd9ca1c8a0c31bbf53f82e4a2b39d (diff)
downloadNim-6a94ca318782de9a3bd0a20f69b5c2ecde3a0dba.tar.gz
fixes #880
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/ttempl5.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template/ttempl5.nim b/tests/template/ttempl5.nim
index 1f2378780..a020a8e2c 100644
--- a/tests/template/ttempl5.nim
+++ b/tests/template/ttempl5.nim
@@ -16,3 +16,14 @@ get_next_ident()
 
 
 #identifier expected, but found '(open|open|open)'
+
+#bug #880 (also example in the manual!)
+
+template typedef(name: expr, typ: typedesc) {.immediate.} =
+  type
+    `T name`* {.inject.} = typ
+    `P name`* {.inject.} = ref `T name`
+
+typedef(myint, int)
+var x: PMyInt
+