literal array indices (#11424)
This commit is contained in:
parent
c99ce5051e
commit
8ee0f14ab6
5 changed files with 44 additions and 4 deletions
6
tests/array/tidx_lit_err1.nim
Normal file
6
tests/array/tidx_lit_err1.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
discard """
|
||||
errormsg: "size of array exceeds range of index type 'range 1..2(Color)' by 3 elements"
|
||||
line: 6
|
||||
"""
|
||||
type Color = enum Red, Green, Blue
|
||||
let y = [Green: 0, 1, 2, 3, 4]
|
||||
Loading…
Add table
Add a link
Reference in a new issue