discardable async procs are now an error (#14176)
* add discard warning in manual
This commit is contained in:
parent
d5fc35c968
commit
9b01c6cf48
4 changed files with 26 additions and 10 deletions
9
tests/async/tdiscardableproc.nim
Normal file
9
tests/async/tdiscardableproc.nim
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue