Fixes #7985
This commit is contained in:
parent
cc63351a5a
commit
60b9c9dc1f
2 changed files with 29 additions and 11 deletions
19
tests/async/t7985.nim
Normal file
19
tests/async/t7985.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
discard """
|
||||
file: "t7985.nim"
|
||||
exitcode: 0
|
||||
output: "(value: 1)"
|
||||
"""
|
||||
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())
|
||||
Loading…
Add table
Add a link
Reference in a new issue