tdefaultrangetypescheck.nim 154 B

123456789101112
  1. discard """
  2. errormsg: "cannot convert 0 to range 1..5(int)"
  3. line: 9
  4. """
  5. type
  6. Point = object
  7. y: int
  8. x: range[1..5] = 0
  9. echo default(Point)