diff options
author | Zahary Karadjov <zahary@gmail.com> | 2012-06-06 20:38:57 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2012-06-06 20:38:57 +0300 |
commit | db8dbab766e4b6b0afb69951f821e461b5424c6c (patch) | |
tree | 3c7f26794962335c0762b727821ab93df7c88002 | |
parent | d10b524c9a52c1d13ca175ac9781c85fad22b0f7 (diff) | |
download | Nim-db8dbab766e4b6b0afb69951f821e461b5424c6c.tar.gz |
fix bootstrapping on POSIX platforms
-rwxr-xr-x | compiler/semstmts.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 3d00d495d..531f3ac5d 100755 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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 |