improvements for nimfix

This commit is contained in:
Araq 2014-09-10 09:48:18 +02:00
commit c5dbcb548f
9 changed files with 37 additions and 12 deletions

View file

@ -254,6 +254,7 @@ proc semResolvedCall(c: PContext, n: PNode, x: TCandidate): PNode =
assert x.state == csMatch
var finalCallee = x.calleeSym
markUsed(n.sons[0].info, finalCallee)
styleCheckUse(n.sons[0].info, finalCallee)
if finalCallee.ast == nil:
internalError(n.info, "calleeSym.ast is nil") # XXX: remove this check!
if finalCallee.ast.sons[genericParamsPos].kind != nkEmpty:
@ -286,6 +287,7 @@ proc explicitGenericSym(c: PContext, n: PNode, s: PSym): PNode =
initCandidate(c, m, s, n)
var newInst = generateInstance(c, s, m.bindings, n.info)
markUsed(n.info, s)
styleCheckUse(n.info, s)
result = newSymNode(newInst, n.info)
proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode =