summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-10-26 22:48:54 +0100
committerAraq <rumpf_a@web.de>2014-10-26 22:48:54 +0100
commit0e439ce36738170bbc1097fcedfed5def7514a31 (patch)
treefa4573d66e24dbebac533df2d0cf6ab255be80ae /tests
parent7a48942719f4a557abafefd6d5cbd8b25a283e3a (diff)
downloadNim-0e439ce36738170bbc1097fcedfed5def7514a31.tar.gz
implements #78
Diffstat (limited to 'tests')
-rw-r--r--tests/clearmsg/mb.nim2
-rw-r--r--tests/clearmsg/mc.nim3
-rw-r--r--tests/clearmsg/ta.nim12
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/clearmsg/mb.nim b/tests/clearmsg/mb.nim
new file mode 100644
index 000000000..2d21e2396
--- /dev/null
+++ b/tests/clearmsg/mb.nim
@@ -0,0 +1,2 @@
+type
+  typ* = distinct string
diff --git a/tests/clearmsg/mc.nim b/tests/clearmsg/mc.nim
new file mode 100644
index 000000000..79d7431df
--- /dev/null
+++ b/tests/clearmsg/mc.nim
@@ -0,0 +1,3 @@
+
+type
+  typ* = distinct int
diff --git a/tests/clearmsg/ta.nim b/tests/clearmsg/ta.nim
new file mode 100644
index 000000000..b21522d12
--- /dev/null
+++ b/tests/clearmsg/ta.nim
@@ -0,0 +1,12 @@
+discard """
+  errormsg: 'type mismatch: got (mc.typ)'
+  line: 12
+"""
+
+import mb, mc
+
+proc test(testing: mb.typ) =
+  discard
+
+var s: mc.typ
+test(s)