diff options
-rw-r--r-- | compiler/vmgen.nim | 2 | ||||
-rw-r--r-- | tests/vm/tvmmisc.nim | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index b7dd193be..79d037e42 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -2050,6 +2050,8 @@ proc genSetConstr(c: PCtx, n: PNode, dest: var TDest) = c.freeTemp(a) proc genObjConstr(c: PCtx, n: PNode, dest: var TDest) = + if tfUnion in n.typ.flags: # bug #22708 # bug #13481 + globalError(c.config, n.info, "object with '{.union.}' pragmas is not supported by VM") if dest < 0: dest = c.getTemp(n.typ) let t = n.typ.skipTypes(abstractRange+{tyOwned}-{tyTypeDesc}) if t.kind == tyRef: diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index f277c20d8..d28f76574 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -301,14 +301,6 @@ block: # bug #10815 const a = P() doAssert $a == "" -when defined osx: # xxx bug #13481 - block: - type CharSet {.union.} = object - cs: set[char] - vs: array[4, uint64] - const a = Charset(cs: {'a'..'z'}) - doAssert a.repr.len > 0 - import tables block: # bug #8007 |