From 2c0bfb34fd5c6891f8dce211c127a4fa19567c2f Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 3 Oct 2018 18:25:25 +0200 Subject: Fix regression w/ templates defined in async proc --- tests/async/ttemplateinasync.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/async/ttemplateinasync.nim (limited to 'tests') 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()) -- cgit 1.4.1-2-gfad0