diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-06-23 23:31:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 23:31:17 +0200 |
commit | 0f91b67f5c15328330f74a8769aed9961940aab2 (patch) | |
tree | 5d951ba9d9a7fde6bbd815fa0d304dd3657e3762 /tests/isolate | |
parent | 496bd790e1b641a7c025bde2c6a1c6dca433ed5d (diff) | |
download | Nim-0f91b67f5c15328330f74a8769aed9961940aab2.tar.gz |
fixes #18326 (#18335)
* fixes #18326 * make tests green again
Diffstat (limited to 'tests/isolate')
-rw-r--r-- | tests/isolate/tisolate.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/isolate/tisolate.nim b/tests/isolate/tisolate.nim index 9f3b15441..a0e71e321 100644 --- a/tests/isolate/tisolate.nim +++ b/tests/isolate/tisolate.nim @@ -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) |