[feature] detect unused imports
This commit is contained in:
parent
44d80dd863
commit
4137a4dbf3
12 changed files with 62 additions and 33 deletions
|
|
@ -64,7 +64,7 @@ proc symChoice(c: PContext, n: PNode, s: PSym, r: TSymChoiceRule): PNode =
|
|||
# (s.kind notin routineKinds or s.magic != mNone):
|
||||
# for instance 'nextTry' is both in tables.nim and astalgo.nim ...
|
||||
result = newSymNode(s, info)
|
||||
markUsed(c.config, info, s, c.graph.usageSym)
|
||||
markUsed(c, info, s, c.graph.usageSym)
|
||||
onUse(info, s)
|
||||
else:
|
||||
# semantic checking requires a type; ``fitNode`` deals with it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue