summary refs log tree commit diff stats
path: root/tests/async/tasync_noasync.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/tasync_noasync.nim')
-rw-r--r--tests/async/tasync_noasync.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/async/tasync_noasync.nim b/tests/async/tasync_noasync.nim
new file mode 100644
index 000000000..812b40da6
--- /dev/null
+++ b/tests/async/tasync_noasync.nim
@@ -0,0 +1,15 @@
+discard """
+  errormsg: "undeclared identifier: 'await'"
+  cmd: "nim c $file"
+  file: "tasync_noasync.nim"
+"""
+import async
+
+proc a {.async.} =
+  discard
+
+await a()
+
+# if we overload a fallback handler to get
+# await only available within {.async.}
+# we would need `{.dirty.}` templates for await
\ No newline at end of file