tsubrange2.nim 174 B

12345678910111213141516
  1. discard """
  2. outputsub: "value out of range: 50 [RangeError]"
  3. exitcode: "1"
  4. """
  5. type
  6. TRange = range[0..40]
  7. proc p(r: TRange) =
  8. discard
  9. var
  10. r: TRange
  11. y = 50
  12. p y