mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
fix bootstrapping on POSIX platforms
This commit is contained in:
@@ -893,7 +893,11 @@ proc generateDestructor(c: PContext, t: PType): PNode =
|
||||
if result == nil: result = newNode(nkStmtList)
|
||||
result.addSon(e)
|
||||
|
||||
# XXX: This may be true for some C-imported types such as
|
||||
# Tposix_spawnattr
|
||||
if t.n == nil or t.n.sons == nil: return
|
||||
internalAssert t.n.kind == nkRecList
|
||||
|
||||
# call the destructods of all fields
|
||||
for s in countup(0, t.n.sons.len - 1):
|
||||
internalAssert t.n.sons[s].kind == nkSym
|
||||
|
||||
Reference in New Issue
Block a user