Fixed yield in nkCheckedFieldExpr (#12429) [backport]

This commit is contained in:
Yuriy Glukhov 2019-10-15 10:16:06 +03:00 • committed by Andreas Rumpf
commit 1aed455e7c
2 changed files with 13 additions and 2 deletions

View file

@ -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"