This commit is contained in:
Andreas Rumpf 2017-09-15 10:30:58 +02:00
commit 50ae228e25
2 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -1,6 +1,7 @@
version 1.0 battle plan version 1.0 battle plan
======================= =======================
- eliminate 'nil' for seqs and strings
- make 'not nil' the default (produce warnings instead of errors for - make 'not nil' the default (produce warnings instead of errors for
a smooth migration path) a smooth migration path)
- case objects needs to be safe and need to support pattern matching - case objects needs to be safe and need to support pattern matching