summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-09-15 16:08:16 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-09-15 16:08:16 +0200
commit053b0ad6f301ade2d3627abed66a6f48a72aa05b (patch)
tree7236547fae29334c14693e9f2b0df758875c6c5b /tests
parent9aeb78e2a86a6a7ab2c4726e634a8fdc7aa91089 (diff)
parent50ae228e255c0f82a1620657521a27f6b8152b58 (diff)
downloadNim-053b0ad6f301ade2d3627abed66a6f48a72aa05b.tar.gz
Merge branch 'araq' of github.com:nim-lang/Nim into araq
Diffstat (limited to 'tests')
-rw-r--r--tests/arithm/tsubrange.nim13
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