first steps to implement object construction expressions
This commit is contained in:
parent
4f79e34a9a
commit
225d657019
12 changed files with 132 additions and 41 deletions
|
|
@ -311,6 +311,12 @@ proc analyse(c: PProcCtx, n: PNode): TThreadOwner =
|
|||
# container construction:
|
||||
result = toNil # nothing until later
|
||||
for i in 0..n.len-1: aggregateOwner(result, analyse(c, n[i]))
|
||||
of nkObjConstr:
|
||||
if n.typ != nil and containsGarbageCollectedRef(n.typ):
|
||||
result = toMine
|
||||
else:
|
||||
result = toNil # nothing until later
|
||||
for i in 1..n.len-1: aggregateOwner(result, analyse(c, n[i]))
|
||||
of nkAddr, nkHiddenAddr:
|
||||
var a = lvalueSym(n)
|
||||
if a.kind == nkSym:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue