idetools improvements; preparation of first class iterators; fixes #183

This commit is contained in:
Araq 2012-08-02 23:14:38 +02:00
commit 7d6500f1de
12 changed files with 95 additions and 36 deletions

View file

@ -70,7 +70,7 @@ proc initCandidate*(c: var TCandidate, callee: PSym, binding: PNode,
c.calleeSym = callee
c.calleeScope = calleeScope
initIdTable(c.bindings)
if binding != nil:
if binding != nil and callee.kind in RoutineKinds:
var typeParams = callee.ast[genericParamsPos]
for i in 1..min(sonsLen(typeParams), sonsLen(binding)-1):
var formalTypeParam = typeParams.sons[i-1].typ