fixes #3973
This commit is contained in:
parent
5757ad858c
commit
6e53300f83
3 changed files with 35 additions and 3 deletions
|
|
@ -1447,12 +1447,12 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode =
|
|||
of tyObject:
|
||||
result = newNodeIT(nkObjConstr, info, t)
|
||||
result.add(newNodeIT(nkEmpty, info, t))
|
||||
getNullValueAux(t.n, result)
|
||||
# initialize inherited fields:
|
||||
var base = t.sons[0]
|
||||
while base != nil:
|
||||
getNullValueAux(skipTypes(base, skipPtrs).n, result)
|
||||
base = base.sons[0]
|
||||
getNullValueAux(t.n, result)
|
||||
of tyArray, tyArrayConstr:
|
||||
result = newNodeIT(nkBracket, info, t)
|
||||
for i in countup(0, int(lengthOrd(t)) - 1):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue