diff options
Diffstat (limited to 'tests/async/tasync_misc.nim')
-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" |