diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index b290faec78..5f846c80ac 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -563,6 +563,26 @@ proc eraseVoidParams*(t: PType) = setLen t.n.sons, pos break +proc eraseTupleVoidFields*(t: PType) = + ## Remove void fields from a named tuple type, compacting both `t.n` + ## (the field symbol nodes) and `t.sonsImpl` (the child types). + if t.n == nil: return # anonymous tuple, nothing to compact + for i in 0..