tforloop_tuple_underscore.nim 258 B

1234567891011121314151617
  1. discard """
  2. errormsg: "the special identifier '_' is ignored in declarations and cannot be used"
  3. """
  4. iterator iter(): (int, int) =
  5. yield (1, 2)
  6. yield (3, 4)
  7. yield (1, 2)
  8. yield (3, 4)
  9. yield (1, 2)
  10. yield (3, 4)
  11. for (_, i) in iter():
  12. echo _