typetraits.$: $((int, float), int) is now "((int, float), int)" instead of "(tuple of (int, float), int)" (#14812)

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Timothee Cour 2020-07-02 07:19:43 -07:00 • committed by GitHub
commit a6cbe58e8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 12 deletions

View file

@ -636,8 +636,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
elif t.len == 0:
result = "tuple[]"
else:
if prefer == preferTypeName: result = "("
else: result = "tuple of ("
result = "("
for i in 0..<t.len:
result.add(typeToString(t[i]))
if i < t.len - 1: result.add(", ")