summary refs log tree commit diff stats
path: root/tests/async/tgenericasync.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/tgenericasync.nim')
-rw-r--r--tests/async/tgenericasync.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/async/tgenericasync.nim b/tests/async/tgenericasync.nim
new file mode 100644
index 000000000..ab704238a
--- /dev/null
+++ b/tests/async/tgenericasync.nim
@@ -0,0 +1,14 @@
+discard """
+  output: '''123
+abc'''
+"""
+
+# bug #4856
+
+import asyncdispatch
+
+proc say[T](t: T): Future[void] {.async.} =
+  echo $t
+
+waitFor(say(123))
+waitFor(say("abc"))