error for NimNode index kind (#12154)

This commit is contained in:
Jasper Jenkins 2019-09-08 11:31:22 -07:00 • committed by Andreas Rumpf
commit e5139b0662
4 changed files with 34 additions and 6 deletions

View file

@ -0,0 +1,8 @@
discard """
errormsg: "index 5 not in 0 .. 2"
line: 7
"""
import macros
macro t(x: untyped): untyped =
result = x[5]
t([1, 2, 3])