tillrec.nim 320 B

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