summary refs log blame commit diff stats
path: root/tests/reject/tillrec.nim
blob: 3f8fe60fca2ba979d7e90864d64e8e1bc86a6da2 (plain) (tree)
1
2
3
4
5
6
7
8
9




                                                    


                               
                            


                      
                                                                               

                             

 
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]