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.
This commit is contained in:
parent
4e619a6bea
commit
7c2ac98880
2 changed files with 11 additions and 1 deletions
10
tests/vm/t17039.nim
Normal file
10
tests/vm/t17039.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
type
|
||||
Obj1 = object
|
||||
case kind: bool
|
||||
of false:
|
||||
field: seq[int]
|
||||
else: discard
|
||||
|
||||
static:
|
||||
var obj1 = Obj1()
|
||||
obj1.field.add(@[])
|
||||
Loading…
Add table
Add a link
Reference in a new issue