[feature] detect unused imports

This commit is contained in:
Araq 2019-07-17 22:36:23 +02:00
commit 4137a4dbf3
12 changed files with 62 additions and 33 deletions

View file

@ -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