Fix array's high & low return type for empty arrays (#17705)
* fix array.high/low return type * Add test for empty array low return type Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
This commit is contained in:
parent
51a40c1f38
commit
363467fc00
3 changed files with 17 additions and 0 deletions
|
|
@ -587,3 +587,10 @@ block t12466:
|
|||
a[0'u16 + i] = i
|
||||
for i in 0'u16 ..< 8'u16:
|
||||
a[0'u16 + i] = i
|
||||
|
||||
block t17705:
|
||||
# https://github.com/nim-lang/Nim/pull/17705
|
||||
var a = array[0, int].low
|
||||
a = int(a)
|
||||
var b = array[0, int].high
|
||||
b = int(b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue