diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 907d2174e4..acf32d1b32 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -80,6 +80,7 @@ proc symChoice(c: PContext, n: PNode, s: PSym, r: TSymChoiceRule; while a != nil: if a.kind != skModule and (not isField or sfGenSym notin s.flags): incl(a.flags, sfUsed) + markOwnerModuleAsUsed(c, a) addSon(result, newSymNode(a, info)) onUse(info, a) a = nextOverloadIter(o, c, n) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 5ddb4c30b8..ea1945a645 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -108,6 +108,7 @@ const isNilConversion = isConvertible # maybe 'isIntConv' fits better? proc markUsed*(c: PContext; info: TLineInfo, s: PSym) +proc markOwnerModuleAsUsed*(c: PContext; s: PSym) template hasFauxMatch*(c: TCandidate): bool = c.fauxMatch != tyNone