mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* 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
18 lines
227 B
Nim
18 lines
227 B
Nim
discard """
|
|
output: "i0"
|
|
"""
|
|
|
|
type
|
|
Application = object
|
|
config: void
|
|
i: int
|
|
f: void
|
|
|
|
proc printFields(rec: Application) =
|
|
for k, v in fieldPairs(rec):
|
|
echo k, v
|
|
|
|
var app: Application
|
|
|
|
printFields(app)
|