summary refs log tree commit diff stats
path: root/tests/distinct
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-05-03 01:05:14 +0200
committerAraq <rumpf_a@web.de>2015-05-03 01:08:52 +0200
commite23857a98bc1f682896910c545eb9eae7ff5225f (patch)
tree84aa8df02d7b0787a9b28b78fb0ad5717f825313 /tests/distinct
parent6cb3635ca05cf5a95b3cc0751bb5f99d41a2e074 (diff)
downloadNim-e23857a98bc1f682896910c545eb9eae7ff5225f.tar.gz
fixes #2629, fixes #2641, fixes #2632, fixes #2630
Diffstat (limited to 'tests/distinct')
-rw-r--r--tests/distinct/tdistinct_consts.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/distinct/tdistinct_consts.nim b/tests/distinct/tdistinct_consts.nim
new file mode 100644
index 000000000..4f6ced2d2
--- /dev/null
+++ b/tests/distinct/tdistinct_consts.nim
@@ -0,0 +1,20 @@
+
+# bug #2641
+
+type MyChar = distinct char
+const c:MyChar = MyChar('a')
+
+type MyBool = distinct bool
+const b:MyBool = MyBool(true)
+
+type MyBoolSet = distinct set[bool]
+const bs:MyBoolSet = MyBoolSet({true})
+
+type MyCharSet= distinct set[char]
+const cs:MyCharSet = MyCharSet({'a'})
+
+type MyBoolSeq = distinct seq[bool]
+const bseq:MyBoolSeq = MyBoolSeq(@[true, false])
+
+type MyBoolArr = distinct array[3, bool]
+const barr:MyBoolArr = MyBoolArr([true, false, true])