Files
Nim/tests/vm/t17039.nim
Saem Ghani 7c2ac98880 Fixes #17039 - ldObj checks node/nodeAddr access (#17123)
Checked field expressions, such as an object variant field access results in
occasionally broken address analysis crashing the VM. This guard added here
mimics guarded access in ldObjAddr as well. This is to prevent a crash, while a
fix is devised.
2021-02-23 09:02:06 +01:00

11 lines
146 B
Nim

type
Obj1 = object
case kind: bool
of false:
field: seq[int]
else: discard
static:
var obj1 = Obj1()
obj1.field.add(@[])