diff options
Diffstat (limited to 'tests/closure/tclosure4.nim')
-rw-r--r-- | tests/closure/tclosure4.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/closure/tclosure4.nim b/tests/closure/tclosure4.nim index 10c7cac54..69c076cd5 100644 --- a/tests/closure/tclosure4.nim +++ b/tests/closure/tclosure4.nim @@ -1,13 +1,13 @@ import json, tables, sequtils -proc run(json_params: TTable) = +proc run(json_params: Table) = let json_elems = json_params["files"].elems # These fail compilation. - var files = map(json_elems, proc (x: PJsonNode): string = x.str) - #var files = json_elems.map do (x: PJsonNode) -> string: x.str + var files = map(json_elems, proc (x: JsonNode): string = x.str) + #var files = json_elems.map do (x: JsonNode) -> string: x.str echo "Hey!" when isMainModule: let text = """{"files": ["a", "b", "c"]}""" - run(toTable((text.parseJson).fields)) + run((text.parseJson).fields) |