tasync_in_seq_constr.nim 307 B

123456789101112131415161718
  1. discard """
  2. output: '''@[1, 2, 3, 4]'''
  3. """
  4. # bug #5314
  5. import asyncdispatch
  6. proc bar(): Future[int] {.async.} =
  7. await sleepAsync(500)
  8. result = 3
  9. proc foo(): Future[seq[int]] {.async.} =
  10. await sleepAsync(500)
  11. result = @[1, 2, await bar(), 4] # <--- The bug is here
  12. echo waitFor foo()