don't invoke destructors for .global. variables

This commit is contained in:
Araq
2012-12-16 20:12:56 +01:00
parent 61a43979e6
commit d16c04d8f8
2 changed files with 4 additions and 2 deletions

View File

@@ -1078,7 +1078,8 @@ proc insertDestructors(c: PContext, varSection: PNode):
varTyp = varId.sym.typ
info = varId.info
if varTyp != nil and instantiateDestructor(c, varTyp):
if varTyp != nil and instantiateDestructor(c, varTyp) and
sfGlobal notin varId.sym.flags:
var tryStmt = newNodeI(nkTryStmt, info)
if j < totalVars - 1:

View File

@@ -1,11 +1,12 @@
version 0.9.2
=============
- fix closure bug finally
- test&finish first class iterators:
* nested iterators
* document them
- fix closure bug finally
- fix marshal bug
- investigate nimgame bug
version 0.9.X