summary refs log tree commit diff stats
path: root/tests/async/t7985.nim
blob: 0365499d3b7cee7b907b72a878c8d48166de2f26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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())