From 5f623ea9ef7fcd35fb6a5ae44074b8c66cb20fcf Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 20 Jul 2016 15:37:25 +0200 Subject: [PATCH] fixes an valid 'T' is not used hint --- compiler/lookups.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/lookups.nim b/compiler/lookups.nim index 962c28613c..ba2358b86a 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)