diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-09-15 10:30:58 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-09-15 10:30:58 +0200 |
commit | 50ae228e255c0f82a1620657521a27f6b8152b58 (patch) | |
tree | 25fc010834b64b554c6eafeeb0a27d78617888cf /tests/arithm | |
parent | 9c513de2ae2346248d6fa99aa0b7943559f48ff7 (diff) | |
download | Nim-50ae228e255c0f82a1620657521a27f6b8152b58.tar.gz |
closes #5854
Diffstat (limited to 'tests/arithm')
-rw-r--r-- | tests/arithm/tsubrange.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/arithm/tsubrange.nim b/tests/arithm/tsubrange.nim new file mode 100644 index 000000000..9d60dbd1a --- /dev/null +++ b/tests/arithm/tsubrange.nim @@ -0,0 +1,13 @@ +discard """ + output: '''1''' +""" + +# bug #5854 +type + n16* = range[0'i16..high(int16)] + +var level: n16 = 1 +let maxLevel: n16 = 1 + +level = min(level + 2, maxLevel) +echo level |