-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Code to reproduce:
import json, asyncdispatch
proc getData(): Future[JsonNode] {.async.} =
result = %*{"value": 1}
type
MyData = object
value: BiggestInt
proc main() {.async.} =
let data = to(await(getData()), MyData)
echo data
waitFor(main())It works if you change let data = to(await getData(), MyData) to
let raw = await(getData())
let data = to(raw, MyData)It also works with Nim 0.18.0 (that's why I call it a regression), and I think that it started happening after last PRs related to async.
yglukhov