summary refs log tree commit diff stats
path: root/tests/async/tdiscardableproc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/tdiscardableproc.nim')
-rw-r--r--tests/async/tdiscardableproc.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/async/tdiscardableproc.nim b/tests/async/tdiscardableproc.nim
new file mode 100644
index 000000000..93cd83be9
--- /dev/null
+++ b/tests/async/tdiscardableproc.nim
@@ -0,0 +1,9 @@
+discard """
+  errormsg: "Cannot make async proc discardable. Futures have to be checked with `asyncCheck` instead of discarded"
+"""
+
+import async
+
+proc foo {.async, discardable.} = discard
+
+foo()