don't invoke destructors for .global. variables

This commit is contained in:
Araq 2012-12-16 20:12:56 +01:00
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