diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-10-03 18:25:25 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-10-03 18:25:25 +0200 |
commit | 2c0bfb34fd5c6891f8dce211c127a4fa19567c2f (patch) | |
tree | 4a368e2d04f2dc82efa1bc4184d6bde92f5bcfc1 /tests/async | |
parent | 91c13a0163c692dd709eed1b0cf7eee0c19d0f96 (diff) | |
download | Nim-2c0bfb34fd5c6891f8dce211c127a4fa19567c2f.tar.gz |
Fix regression w/ templates defined in async proc
Diffstat (limited to 'tests/async')
-rw-r--r-- | tests/async/ttemplateinasync.nim | 11 |
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()) |