breaking change: 'and' and 'mod' do not produce a subrange type anymore; fixes #5854

This commit is contained in:
Andreas Rumpf
2017-10-30 00:27:30 +01:00
parent aa526da706
commit d7a896f19d
6 changed files with 16 additions and 131 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