From 50ae228e255c0f82a1620657521a27f6b8152b58 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 15 Sep 2017 10:30:58 +0200 Subject: [PATCH] closes #5854 --- tests/arithm/tsubrange.nim | 13 +++++++++++++ todo.txt | 1 + 2 files changed, 14 insertions(+) create mode 100644 tests/arithm/tsubrange.nim 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 diff --git a/todo.txt b/todo.txt index 7597c436a..1678c1599 100644 --- a/todo.txt +++ b/todo.txt @@ -1,6 +1,7 @@ version 1.0 battle plan ======================= +- eliminate 'nil' for seqs and strings - make 'not nil' the default (produce warnings instead of errors for a smooth migration path) - case objects needs to be safe and need to support pattern matching