Nim/tests/types/tillrec.nim
2018-12-11 21:23:21 +01:00

15 lines
320 B
Nim

discard """
errormsg: "illegal recursion in type \'TIllegal\'"
file: "tillrec.nim"
line: 13
"""
# 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]