parent
496bd790e1
commit
0f91b67f5c
2 changed files with 9 additions and 4 deletions
|
|
@ -1,12 +1,17 @@
|
|||
discard """
|
||||
errormsg: "expression cannot be isolated: select(a, b)"
|
||||
line: 34
|
||||
line: 39
|
||||
"""
|
||||
|
||||
import std / isolation
|
||||
|
||||
import json, streams
|
||||
|
||||
proc myParseJson(s: Stream; filename: string): JsonNode =
|
||||
{.cast(noSideEffect).}:
|
||||
result = parseJson(s, filename)
|
||||
|
||||
|
||||
proc f(): seq[int] =
|
||||
@[1, 2, 3]
|
||||
|
||||
|
|
@ -28,7 +33,7 @@ proc main =
|
|||
discard isolate select(Node(x: "a"), nil)
|
||||
discard isolate select(Node(x: "a"), Node(x: "b"))
|
||||
|
||||
discard isolate parseJson(newFileStream("my.json"), "my.json")
|
||||
discard isolate myParseJson(newFileStream("my.json"), "my.json")
|
||||
|
||||
var a, b: Node
|
||||
discard isolate select(a, b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue