summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-09-02 12:49:31 +0200
committerAraq <rumpf_a@web.de>2019-09-02 12:49:31 +0200
commitfc7fe636e22f1a9a502e805256c01c70e8695f88 (patch)
treec443ae4b1427bf5dd3ec02402d3a76e1efeb4ab9 /compiler/semtempl.nim
parent23c44f009a0d69f7f7f536687b5e3d18e0c370d3 (diff)
downloadNim-fc7fe636e22f1a9a502e805256c01c70e8695f88.tar.gz
improvement for 'unused import' warnings
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r--compiler/semtempl.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 907d2174e..acf32d1b3 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)