[feature] detect unused imports
This commit is contained in:
parent
44d80dd863
commit
4137a4dbf3
12 changed files with 62 additions and 33 deletions
|
|
@ -474,7 +474,7 @@ proc semResolvedCall(c: PContext, x: TCandidate,
|
|||
assert x.state == csMatch
|
||||
var finalCallee = x.calleeSym
|
||||
let info = getCallLineInfo(n)
|
||||
markUsed(c.config, info, finalCallee, c.graph.usageSym)
|
||||
markUsed(c, info, finalCallee, c.graph.usageSym)
|
||||
onUse(info, finalCallee)
|
||||
assert finalCallee.ast != nil
|
||||
if x.hasFauxMatch:
|
||||
|
|
@ -584,7 +584,7 @@ proc explicitGenericSym(c: PContext, n: PNode, s: PSym): PNode =
|
|||
var newInst = generateInstance(c, s, m.bindings, n.info)
|
||||
newInst.typ.flags.excl tfUnresolved
|
||||
let info = getCallLineInfo(n)
|
||||
markUsed(c.config, info, s, c.graph.usageSym)
|
||||
markUsed(c, info, s, c.graph.usageSym)
|
||||
onUse(info, s)
|
||||
result = newSymNode(newInst, info)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue