summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-11-18 23:15:35 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-11-18 23:15:35 +0100
commitc59ab1d9c62b8e019dddd903e660138bce2adb0b (patch)
treeb426825137641da4ef6a4ac53e602ffcd8644398 /tests
parent15487438566ed1b22ee3b840749f68be73d07582 (diff)
downloadNim-c59ab1d9c62b8e019dddd903e660138bce2adb0b.tar.gz
added a test case for bug #6776
Diffstat (limited to 'tests')
-rw-r--r--tests/errmsgs/tmake_tuple_visible.nim23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/errmsgs/tmake_tuple_visible.nim b/tests/errmsgs/tmake_tuple_visible.nim
new file mode 100644
index 000000000..43337c2a9
--- /dev/null
+++ b/tests/errmsgs/tmake_tuple_visible.nim
@@ -0,0 +1,23 @@
+discard """
+  errormsg: '''got (tuple of (type NimEdAppWindow, int))'''
+  line: 22
+  nimout: '''got (tuple of (type NimEdAppWindow, int))
+but expected one of:
+template xxx(tn: typedesc; i: int)'''
+"""
+
+type
+  NimEdAppWindow = ptr NimEdAppWindowObj
+  NimEdAppWindowObj = object
+    i: int
+
+template gDefineTypeExtended*(tn: typeDesc) =
+  discard
+
+gDefineTypeExtended (NimEdAppWindow)
+
+template xxx*(tn: typeDesc, i: int) =
+  discard
+
+xxx (NimEdAppWindow, 0)
+# bug #6776