summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-20 15:37:25 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-20 16:16:56 +0200
commit5f623ea9ef7fcd35fb6a5ae44074b8c66cb20fcf (patch)
tree5f14f5c211983e2e1be14bb772e0e746af8eb731 /compiler
parent38307a1f33e335a6b6e9bc16f02b0c08de9b756a (diff)
downloadNim-5f623ea9ef7fcd35fb6a5ae44074b8c66cb20fcf.tar.gz
fixes an valid 'T' is not used hint
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lookups.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 962c28613..ba2358b86 100644
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -153,7 +153,8 @@ proc ensureNoMissingOrUnusedSymbols(scope: PScope) =
       if s.kind notin {skForVar, skParam, skMethod, skUnknown, skGenericParam}:
         # XXX: implicit type params are currently skTypes
         # maybe they can be made skGenericParam as well.
-        if s.typ != nil and tfImplicitTypeParam notin s.typ.flags:
+        if s.typ != nil and tfImplicitTypeParam notin s.typ.flags and
+           s.typ.kind != tyGenericParam:
           message(s.info, hintXDeclaredButNotUsed, getSymRepr(s))
     s = nextIter(it, scope.symbols)