check the owners of generic instantiations properly and fix tinvalidclosure

This commit is contained in:
Zahary Karadjov 2013-08-14 22:20:20 +03:00
commit 4980ef85e2
2 changed files with 12 additions and 3 deletions

View file

@ -219,8 +219,8 @@ proc getHiddenParam(routine: PSym): PSym =
result = hidden.sym
proc isInnerProc(s, outerProc: PSym): bool {.inline.} =
result = s.kind in {skProc, skMethod, skConverter} and
s.owner == outerProc
result = s.kind in {skProc, skMethod, skConverter} and
s.skipGenericOwner == outerProc
#s.typ.callConv == ccClosure
proc addClosureParam(i: PInnerContext, e: PEnv) =