fixes #6757
This commit is contained in:
parent
fccdbb3238
commit
416aa921fa
1 changed files with 7 additions and 1 deletions
|
|
@ -2275,7 +2275,13 @@ proc getDefaultValue(p: BProc; typ: PType; info: TLineInfo): Rope =
|
||||||
result = "{{$1}}" % [genTypeInfo(p.module, t, info)]
|
result = "{{$1}}" % [genTypeInfo(p.module, t, info)]
|
||||||
else:
|
else:
|
||||||
result = rope"{}"
|
result = rope"{}"
|
||||||
of tyArray, tyTuple: result = rope"{}"
|
of tyTuple:
|
||||||
|
result = rope"{"
|
||||||
|
for i in 0 ..< typ.len:
|
||||||
|
if i > 0: result.add ", "
|
||||||
|
result.add getDefaultValue(p, typ.sons[i], info)
|
||||||
|
result.add "}"
|
||||||
|
of tyArray: result = rope"{}"
|
||||||
of tySet:
|
of tySet:
|
||||||
if mapType(t) == ctArray: result = rope"{}"
|
if mapType(t) == ctArray: result = rope"{}"
|
||||||
else: result = rope"0"
|
else: result = rope"0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue