void object fields are now ignored by codegen and fields/fieldPairs iterator (#10144)
* Codegen now ignores object fields of type void * Fix `$` bug for objects/tuples where it does not add a comma * fields/fieldPairs iterators now ignore void types * Use `isEmptyType` instead of checking for `tyVoid` directly
This commit is contained in:
parent
6389271d1c
commit
d998cb58dd
5 changed files with 25 additions and 0 deletions
|
|
@ -2700,6 +2700,7 @@ proc `$`*[T: tuple|object](x: T): string =
|
|||
firstElement = false
|
||||
else:
|
||||
result.add("...")
|
||||
firstElement = false
|
||||
when not isNamed:
|
||||
if count == 1:
|
||||
result.add(",") # $(1,) should print as the semantically legal (1,)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue