This commit is contained in:
Andreas Rumpf 2020-07-20 07:50:19 +02:00 • committed by GitHub
commit 71dd5f85b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 194 additions and 6 deletions

View file

@ -0,0 +1,36 @@
discard """
errormsg: "expression cannot be isolated: select(a, b)"
line: 34
"""
import std / isolation
import json, streams
proc f(): seq[int] =
@[1, 2, 3]
type
Node = ref object
x: string
proc g(): Node = nil
proc select(a, b: Node): Node =
a
proc main =
discard isolate f()
discard isolate g()
discard isolate select(Node(x: "a"), nil)
discard isolate select(Node(x: "a"), Node(x: "b"))
discard isolate parseJson(newFileStream("my.json"), "my.json")
var a, b: Node
discard isolate select(a, b)
main()