discardable async procs are now an error (#14176)

* add discard warning in manual
This commit is contained in:
hlaaftana
2020-05-01 10:49:13 +03:00
committed by GitHub
parent d5fc35c968
commit 9b01c6cf48
4 changed files with 26 additions and 10 deletions

View File

@@ -2568,7 +2568,8 @@ Example:
discard p(3, 4) # discard the return value of `p`
The ``discard`` statement evaluates its expression for side-effects and
throws the expression's resulting value away.
throws the expression's resulting value away, and should only be used
when ignoring this value is known not to cause problems.
Ignoring the return value of a procedure without using a discard statement is
a static error.