parent
e192e07bf0
commit
9ff2c50155
2 changed files with 29 additions and 0 deletions
|
|
@ -799,6 +799,7 @@ proc trackCall(tracked: PEffects; n: PNode) =
|
||||||
|
|
||||||
# check required for 'nim check':
|
# check required for 'nim check':
|
||||||
if n[1].typ.len > 0:
|
if n[1].typ.len > 0:
|
||||||
|
createTypeBoundOps(tracked, n[1].typ.lastSon, n.info)
|
||||||
createTypeBoundOps(tracked, n[1].typ, n.info)
|
createTypeBoundOps(tracked, n[1].typ, n.info)
|
||||||
# new(x, finalizer): Problem: how to move finalizer into 'createTypeBoundOps'?
|
# new(x, finalizer): Problem: how to move finalizer into 'createTypeBoundOps'?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -319,3 +319,31 @@ proc createMachine =
|
||||||
echo machine.factory().hello
|
echo machine.factory().hello
|
||||||
|
|
||||||
createMachine()
|
createMachine()
|
||||||
|
|
||||||
|
# bug #15122
|
||||||
|
|
||||||
|
import tables
|
||||||
|
|
||||||
|
type
|
||||||
|
BENodeKind = enum
|
||||||
|
tkBytes,
|
||||||
|
tkList,
|
||||||
|
tkDict
|
||||||
|
|
||||||
|
BENode = object
|
||||||
|
case kind: BENodeKind
|
||||||
|
of tkBytes: strVal: string
|
||||||
|
of tkList: listVal: seq[BENode]
|
||||||
|
of tkDict: dictVal: Table[string, BENode]
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
"examples": {
|
||||||
|
"values": BENode(
|
||||||
|
kind: tkList,
|
||||||
|
listVal: @[BENode(kind: tkBytes, strVal: "test")]
|
||||||
|
)
|
||||||
|
}.toTable()
|
||||||
|
}.toTable()
|
||||||
|
|
||||||
|
# For ARC listVal is empty for some reason
|
||||||
|
doAssert data["examples"]["values"].listVal[0].strVal == "test"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue