tnot_allowed_lent2.nim 175 B

123456789101112131415
  1. discard """
  2. errormsg: "'x' cannot be assigned to"
  3. line: 10
  4. """
  5. proc bug14498 =
  6. var a = @['a', 'b', 'c', 'd', 'e', 'f']
  7. for x in a:
  8. x = 'c'
  9. echo a
  10. bug14498()