diff options
author | Carlo Capocasa <carlo@capocasa.net> | 2022-06-11 18:23:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-11 18:23:31 +0200 |
commit | e2e663a14389500b07e2f6fcd5c231536bdf76a0 (patch) | |
tree | d4664542ea9e506a65eeb67511ca8aa097c1dc4d /lib | |
parent | ac89eead8a40a1a8ee170a4650a1d47e203da14c (diff) | |
download | Nim-e2e663a14389500b07e2f6fcd5c231536bdf76a0.tar.gz |
Friendlier error message with solution (#19880)
* Add helpful suggestion, should always apply * mention var param limitation in async docs * Update compiler/lambdalifting.nim whoops thanks Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/asyncdispatch.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 755f59ff7..0d406b271 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -98,6 +98,10 @@ ## `await`. The following section shows different ways that you can handle ## exceptions in async procs. ## +## .. caution:: +## Procedures marked {.async.} do not support mutable parameters such +## as `var int`. References such as `ref int` should be used instead. +## ## Handling Exceptions ## ------------------- ## @@ -192,6 +196,7 @@ ## ================ ## ## * The effect system (`raises: []`) does not work with async procedures. +## * Mutable parameters are not supported by async procedures. ## ## ## Multiple async backend support |