tgeneric_recursionlimit.nim 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. discard """
  2. action: "compile"
  3. """
  4. # https://github.com/nim-lang/Nim/issues/20348
  5. type
  6. Payload[T] = object
  7. payload: T
  8. Carrier[T] = object
  9. val: T
  10. type
  11. Payload0*[T] = object
  12. payload: Payload[T]
  13. Payload1*[T] = object
  14. payload: Payload[T]
  15. Payload2*[T] = object
  16. payload: Payload[T]
  17. Payload3*[T] = object
  18. payload: Payload[T]
  19. Payload4*[T] = object
  20. payload: Payload[T]
  21. Payload5*[T] = object
  22. payload: Payload[T]
  23. Payload6*[T] = object
  24. payload: Payload[T]
  25. Payload7*[T] = object
  26. payload: Payload[T]
  27. Payload8*[T] = object
  28. payload: Payload[T]
  29. Payload9*[T] = object
  30. payload: Payload[T]
  31. Payload10*[T] = object
  32. payload: Payload[T]
  33. Payload11*[T] = object
  34. payload: Payload[T]
  35. Payload12*[T] = object
  36. payload: Payload[T]
  37. Payload13*[T] = object
  38. payload: Payload[T]
  39. Payload14*[T] = object
  40. payload: Payload[T]
  41. Payload15*[T] = object
  42. payload: Payload[T]
  43. Payload16*[T] = object
  44. payload: Payload[T]
  45. Payload17*[T] = object
  46. payload: Payload[T]
  47. Payload18*[T] = object
  48. payload: Payload[T]
  49. Payload19*[T] = object
  50. payload: Payload[T]
  51. Payload20*[T] = object
  52. payload: Payload[T]
  53. Payload21*[T] = object
  54. payload: Payload[T]
  55. Payload22*[T] = object
  56. payload: Payload[T]
  57. Payload23*[T] = object
  58. payload: Payload[T]
  59. Payload24*[T] = object
  60. payload: Payload[T]
  61. Payload25*[T] = object
  62. payload: Payload[T]
  63. Payload26*[T] = object
  64. payload: Payload[T]
  65. Payload27*[T] = object
  66. payload: Payload[T]
  67. Payload28*[T] = object
  68. payload: Payload[T]
  69. Payload29*[T] = object
  70. payload: Payload[T]
  71. Payload30*[T] = object
  72. payload: Payload[T]
  73. Payload31*[T] = object
  74. payload: Payload[T]
  75. Payload32*[T] = object
  76. payload: Payload[T]
  77. Payload33*[T] = object
  78. payload: Payload[T]
  79. type
  80. Carriers*[T] = object
  81. c0*: Carrier[Payload0[T]]
  82. c1*: Carrier[Payload1[T]]
  83. c2*: Carrier[Payload2[T]]
  84. c3*: Carrier[Payload3[T]]
  85. c4*: Carrier[Payload4[T]]
  86. c5*: Carrier[Payload5[T]]
  87. c6*: Carrier[Payload6[T]]
  88. c7*: Carrier[Payload7[T]]
  89. c8*: Carrier[Payload8[T]]
  90. c9*: Carrier[Payload9[T]]
  91. c10*: Carrier[Payload10[T]]
  92. c11*: Carrier[Payload11[T]]
  93. c12*: Carrier[Payload12[T]]
  94. c13*: Carrier[Payload13[T]]
  95. c14*: Carrier[Payload14[T]]
  96. c15*: Carrier[Payload15[T]]
  97. c16*: Carrier[Payload16[T]]
  98. c17*: Carrier[Payload17[T]]
  99. c18*: Carrier[Payload18[T]]
  100. c19*: Carrier[Payload19[T]]
  101. c20*: Carrier[Payload20[T]]
  102. c21*: Carrier[Payload21[T]]
  103. c22*: Carrier[Payload22[T]]
  104. c23*: Carrier[Payload23[T]]
  105. c24*: Carrier[Payload24[T]]
  106. c25*: Carrier[Payload25[T]]
  107. c26*: Carrier[Payload26[T]]
  108. c27*: Carrier[Payload27[T]]
  109. c28*: Carrier[Payload28[T]]
  110. c29*: Carrier[Payload29[T]]
  111. c30*: Carrier[Payload30[T]]
  112. c31*: Carrier[Payload31[T]]
  113. c32*: Carrier[Payload32[T]]
  114. c33*: Carrier[Payload33[T]]
  115. var carriers : Carriers[int]
  116. static:
  117. assert $(typeof(carriers.c33.val)) == "Payload33[system.int]"