work-in-progress for compiling generics in their owner module
This commit is contained in:
parent
3e79e9f981
commit
b01d9b6181
4 changed files with 17 additions and 8 deletions
|
|
@ -152,7 +152,7 @@ proc genSingleVar(p: BProc, a: PNode) =
|
|||
var immediateAsgn = a.sons[2].kind != nkEmpty
|
||||
if sfGlobal in v.flags:
|
||||
if v.owner.kind != skModule:
|
||||
targetProc = p.module.preInitProc
|
||||
targetProc = p.module.postInitProc
|
||||
assignGlobalVar(targetProc, v)
|
||||
# XXX: be careful here.
|
||||
# Global variables should not be zeromem-ed within loops
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue