tillegaltuplerecursion.nim 760 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. discard """
  2. errormsg: "illegal recursion in type"
  3. """
  4. # This is one big illegal type cycle. It doesn't really matter at
  5. # what line the error is reported, nor what name is picked to point
  6. # out the illegal recursion.
  7. type
  8. MyType0 = ref tuple
  9. children: MyType1
  10. MyType1 = ref tuple
  11. children: array[10, MyType2]
  12. MyType2 = ref tuple
  13. children: seq[MyType3]
  14. MyType3 = ref tuple
  15. children: UncheckedArray[MyType4]
  16. MyType4 = ref tuple
  17. children: MyType5
  18. MyType5 = tuple
  19. children: array[10, MyType6]
  20. MyType6 = tuple
  21. children: seq[MyType7]
  22. MyType7 = tuple
  23. children: UncheckedArray[MyType8]
  24. MyType8 = tuple
  25. children: ptr MyType9
  26. MyType9 = tuple
  27. children: MyType10
  28. MyType10 = distinct seq[MyType0]