summary refs log tree commit diff stats
path: root/tests/async
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-10-03 18:25:25 +0200
committerLemonBoy <thatlemon@gmail.com>2018-10-03 18:25:25 +0200
commit2c0bfb34fd5c6891f8dce211c127a4fa19567c2f (patch)
tree4a368e2d04f2dc82efa1bc4184d6bde92f5bcfc1 /tests/async
parent91c13a0163c692dd709eed1b0cf7eee0c19d0f96 (diff)
downloadNim-2c0bfb34fd5c6891f8dce211c127a4fa19567c2f.tar.gz
Fix regression w/ templates defined in async proc
Diffstat (limited to 'tests/async')
-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())