tillrec.nim 321 B

1234567891011121314151617
  1. discard """
  2. file: "tillrec.nim"
  3. line: 13
  4. errormsg: "illegal recursion in type \'TIllegal\'"
  5. """
  6. # test illegal recursive types
  7. type
  8. TLegal {.final.} = object
  9. x: int
  10. kids: seq[TLegal]
  11. TIllegal {.final.} = object #ERROR_MSG illegal recursion in type 'TIllegal'
  12. y: int
  13. x: array[0..3, TIllegal]