diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-05-05 14:14:22 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-05-05 14:14:22 +0100 |
commit | ac1fbf14696aa896286fce7cec485770789eedab (patch) | |
tree | 5344305b2ab58b211dd41f2cf0e401015ee3f56d /tests/distinct/tdistinct_consts.nim | |
parent | 0be654efe11311fcf1200c0e7dba9ecd55fa5591 (diff) | |
parent | b9e02b1efc14a309e613ec4d4cf8c793503bc797 (diff) | |
download | Nim-ac1fbf14696aa896286fce7cec485770789eedab.tar.gz |
Merge branch 'devel'
Diffstat (limited to 'tests/distinct/tdistinct_consts.nim')
-rw-r--r-- | tests/distinct/tdistinct_consts.nim | 20 |
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]) |