diff options
author | Yuriy Glukhov <yglukhov@users.noreply.github.com> | 2019-10-15 10:16:06 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-10-15 09:16:06 +0200 |
commit | 1aed455e7cc22368299a40bb16f73d43ed8c544e (patch) | |
tree | 898970a985fd0451ae1988548054ff7faa647054 /tests | |
parent | 48975bb3e7c1d5f8e1f81981cd5e3c028ccf37a5 (diff) | |
download | Nim-1aed455e7cc22368299a40bb16f73d43ed8c544e.tar.gz |
Fixed yield in nkCheckedFieldExpr (#12429) [backport]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/async/tasync_misc.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/async/tasync_misc.nim b/tests/async/tasync_misc.nim index dbc2ea434..1febdedb3 100644 --- a/tests/async/tasync_misc.nim +++ b/tests/async/tasync_misc.nim @@ -43,4 +43,14 @@ block: #8399 waitFor foo("$asd") +block: # nkCheckedFieldExpr + proc bar(): Future[JsonNode] {.async.} = + return newJInt(5) + + proc foo() {.async.} = + let n = 10 + (await bar()).num + doAssert(n == 15) + + waitFor foo() + echo "ok" |