tsubrange3.nim 197 B

123456789101112131415161718
  1. discard """
  2. outputsub: "value out of range: 50 notin 0 .. 40 [RangeDefect]"
  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. r = y
  13. #p y