diff options
author | hlaaftana <10591326+hlaaftana@users.noreply.github.com> | 2020-05-01 10:49:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 09:49:13 +0200 |
commit | 9b01c6cf48de5bac8abd32f0327c729d177be653 (patch) | |
tree | f153d8fca13d010434d5f0f00a750b4ed46c6f07 /tests/async/tdiscardableproc.nim | |
parent | d5fc35c968c49c6f5529624108ed327095a548c4 (diff) | |
download | Nim-9b01c6cf48de5bac8abd32f0327c729d177be653.tar.gz |
discardable async procs are now an error (#14176)
* add discard warning in manual
Diffstat (limited to 'tests/async/tdiscardableproc.nim')
-rw-r--r-- | tests/async/tdiscardableproc.nim | 9 |
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..80286ece0 --- /dev/null +++ b/tests/async/tdiscardableproc.nim @@ -0,0 +1,9 @@ +discard """ + errmsg: "Cannot make async proc discardable. Futures have to be checked with `asyncCheck` instead of discarded" +""" + +import async + +proc foo {.async, discardable.} = discard + +foo() |