remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors * simplify nimNoNilSeqs2 * simplify nimNoNilSeqs * fixup
This commit is contained in:
parent
4e1e231e29
commit
6e267d28b3
13 changed files with 29 additions and 93 deletions
|
|
@ -1237,10 +1237,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
|
|||
var body = s.typ.lastSon
|
||||
if body.kind == tyObject:
|
||||
# erases all declared fields
|
||||
when defined(nimNoNilSeqs):
|
||||
body.n.sons = @[]
|
||||
else:
|
||||
body.n.sons = nil
|
||||
body.n.sons = @[]
|
||||
|
||||
popOwner(c)
|
||||
closeScope(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue