fixes a critical codegen bug triggered by .async

This commit is contained in:
Araq 2015-09-10 08:32:39 +02:00
commit ffe51966b9
4 changed files with 72 additions and 52 deletions

View file

@ -760,7 +760,7 @@ proc requestConstImpl(p: BProc, sym: PSym) =
var m = p.module
useHeader(m, sym)
if sym.loc.k == locNone:
fillLoc(sym.loc, locData, sym.typ, mangleName(sym), OnUnknown)
fillLoc(sym.loc, locData, sym.typ, mangleName(sym), OnStatic)
if lfNoDecl in sym.loc.flags: return
# declare implementation:
var q = findPendingModule(m, sym)