trt_discrim_err2.nim 336 B

123456789101112131415
  1. discard """
  2. errormsg: " branch initialization with a runtime discriminator only supports ordinal types with 2^16 elements or less."
  3. line: 13
  4. """
  5. type
  6. HoledObj = object
  7. case kind: range[0 .. 20000]
  8. of 0: a: int
  9. else: discard
  10. let someInt = low(int)
  11. case someInt
  12. of 938: echo HoledObj(kind: someInt, a: 1)
  13. else: discard