* typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[] * changelog
This commit is contained in:
parent
5d5df4a394
commit
1b41c3122b
4 changed files with 34 additions and 22 deletions
|
|
@ -634,13 +634,14 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
|
|||
if i < t.n.len - 1: result.add(", ")
|
||||
result.add(']')
|
||||
elif t.len == 0:
|
||||
result = "tuple"
|
||||
result = "tuple[]"
|
||||
else:
|
||||
if prefer == preferTypeName: result = "("
|
||||
else: result = "tuple of ("
|
||||
for i in 0..<t.len:
|
||||
result.add(typeToString(t[i]))
|
||||
if i < t.len - 1: result.add(", ")
|
||||
elif t.len == 1: result.add(",")
|
||||
result.add(')')
|
||||
of tyPtr, tyRef, tyVar, tyLent:
|
||||
result = typeToStr[t.kind]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue