From b01d9b6181be56b1300847cc1352652caa77e437 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sat, 27 Jul 2013 10:17:58 +0300 Subject: work-in-progress for compiling generics in their owner module --- compiler/seminst.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/seminst.nim') diff --git a/compiler/seminst.nim b/compiler/seminst.nim index 15be33261..47d889a60 100644 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -233,11 +233,11 @@ proc generateInstance(c: PContext, fn: PSym, pt: TIdTable, # we set the friend module: var oldFriend = c.friendModule c.friendModule = getModule(fn) + #let oldScope = c.currentScope + #c.currentScope = fn.scope result = copySym(fn, false) incl(result.flags, sfFromGeneric) - # keep the owner if it's an inner proc (for proper closure transformations): - if fn.owner.kind == skModule: - result.owner = getCurrOwner().owner + result.owner = fn result.ast = n pushOwner(result) openScope(c) @@ -267,6 +267,7 @@ proc generateInstance(c: PContext, fn: PSym, pt: TIdTable, popInfoContext() closeScope(c) # close scope for parameters popOwner() + #c.currentScope = oldScope c.friendModule = oldFriend dec(c.InstCounter) if result.kind == skMethod: finishMethod(c, result) -- cgit 1.4.1-2-gfad0 class='active' href='/tilde/site/blame/wiki/lib/plugins/styling/popup.php?id=e00b31c0bc82e89afff4a6bed9139914e095b12a'>blame commit diff stats
path: root/wiki/lib/plugins/styling/popup.php
blob: 964b19e296a1d2217591e5dd3f76d3d0003168f8 (plain) (tree)