[isolation]fix empty ref object bug (#17471)

* fix nim js cmp fails at CT

* [Minor]fix empty ref object for isolation

* Update compiler/isolation_check.nim

* Update compiler/isolation_check.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
flywind 2021-03-24 16:44:24 +08:00 • committed by GitHub
commit 465a41c308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -8,6 +8,14 @@ import std/[isolation, json]
proc main() =
block:
type
Empty = ref object
var x = isolate(Empty())
discard extract(x)
block: # string literals
var data = isolate("string")
doAssert data.extract == "string"