Nim/tests/reject/tillrec.nim
2013-03-16 23:53:07 +01:00

17 lines
332 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]