fix #17264 [backport:1.4] (#17266)

* fix #17264
* fix vm
* fix js and add tests
This commit is contained in:
flywind 2021-03-05 21:39:46 +08:00 • committed by GitHub
commit 171b03c386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 5 deletions

View file

@ -25,7 +25,8 @@ proc `=destroy`*[T](dest: var Isolated[T]) {.inline.} =
# delegate to value's destroy operation
`=destroy`(dest.value)
func isolate*[T](value: sink T): Isolated[T] {.magic: "Isolate".}
func isolate*[T](value: sink T): Isolated[T] {.magic: "Isolate".} =
## Create an isolated subgraph from the expression `value`.
## Please read https://github.com/nim-lang/RFCs/issues/244
## for more details.
Isolated[T](value: value)