improvement for 'unused import' warnings
This commit is contained in:
parent
23c44f009a
commit
fc7fe636e2
2 changed files with 2 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ proc symChoice(c: PContext, n: PNode, s: PSym, r: TSymChoiceRule;
|
||||||
while a != nil:
|
while a != nil:
|
||||||
if a.kind != skModule and (not isField or sfGenSym notin s.flags):
|
if a.kind != skModule and (not isField or sfGenSym notin s.flags):
|
||||||
incl(a.flags, sfUsed)
|
incl(a.flags, sfUsed)
|
||||||
|
markOwnerModuleAsUsed(c, a)
|
||||||
addSon(result, newSymNode(a, info))
|
addSon(result, newSymNode(a, info))
|
||||||
onUse(info, a)
|
onUse(info, a)
|
||||||
a = nextOverloadIter(o, c, n)
|
a = nextOverloadIter(o, c, n)
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ const
|
||||||
isNilConversion = isConvertible # maybe 'isIntConv' fits better?
|
isNilConversion = isConvertible # maybe 'isIntConv' fits better?
|
||||||
|
|
||||||
proc markUsed*(c: PContext; info: TLineInfo, s: PSym)
|
proc markUsed*(c: PContext; info: TLineInfo, s: PSym)
|
||||||
|
proc markOwnerModuleAsUsed*(c: PContext; s: PSym)
|
||||||
|
|
||||||
template hasFauxMatch*(c: TCandidate): bool = c.fauxMatch != tyNone
|
template hasFauxMatch*(c: TCandidate): bool = c.fauxMatch != tyNone
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue