Fixed yield in nkCheckedFieldExpr (#12429) [backport]
This commit is contained in:
parent
48975bb3e7
commit
1aed455e7c
2 changed files with 13 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue