summary refs log tree commit diff stats
path: root/tests/async/ttemplateinasync.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/ttemplateinasync.nim')
-rw-r--r--tests/async/ttemplateinasync.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/async/ttemplateinasync.nim b/tests/async/ttemplateinasync.nim
new file mode 100644
index 000000000..f4a2da538
--- /dev/null
+++ b/tests/async/ttemplateinasync.nim
@@ -0,0 +1,11 @@
+discard """
+  output: 42
+"""
+
+import asyncdispatch
+
+proc foo(): Future[int] {.async.} =
+  template ret() = return 42
+  ret()
+
+echo (waitFor foo())