mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
breaking change: 'and' and 'mod' do not produce a subrange type anymore; fixes #5854
This commit is contained in:
13
tests/arithm/tsubrange.nim
Normal file
13
tests/arithm/tsubrange.nim
Normal 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
|
||||
Reference in New Issue
Block a user