Nim/tests/types/tillrec.nim
2014-08-31 15:15:26 +02:00

16 lines
321 B
Nim

discard """
file: "tillrec.nim"
line: 13
errormsg: "illegal recursion in type \'TIllegal\'"
"""
# test illegal recursive types
type
TLegal {.final.} = object
x: int
kids: seq[TLegal]
TIllegal {.final.} = object #ERROR_MSG illegal recursion in type 'TIllegal'
y: int
x: array[0..3, TIllegal]