Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Dec 27, 2018
1 parent 65a52ec commit eb4756f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/lookups.nim
Expand Up @@ -174,7 +174,7 @@ proc ensureNoMissingOrUnusedSymbols(c: PContext; scope: PScope) =
# maybe they can be made skGenericParam as well.
if s.typ != nil and tfImplicitTypeParam notin s.typ.flags and
s.typ.kind != tyGenericParam:
message(c.config, s.info, hintXDeclaredButNotUsed, getSymRepr(c.config, s))
message(c.config, s.info, hintXDeclaredButNotUsed, s.name.s)
s = nextIter(it, scope.symbols)

proc wrongRedefinition*(c: PContext; info: TLineInfo, s: string;
Expand Down
8 changes: 4 additions & 4 deletions tests/errmsgs/treportunused.nim
@@ -1,12 +1,12 @@
discard """
nimout: '''
treportunused.nim(19, 10) Hint: 'treportunused.s1(a: string)[declared in treportunused.nim(19, 9)]' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(19, 10) Hint: 's1' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(26, 5) Hint: 's8' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(22, 6) Hint: 'treportunused.s4()[declared in treportunused.nim(22, 5)]' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(22, 6) Hint: 's4' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(25, 7) Hint: 's7' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(24, 7) Hint: 's6' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(23, 6) Hint: 'treportunused.s5(a: T)[declared in treportunused.nim(23, 5)]' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(20, 10) Hint: 'treportunused.s2()[declared in treportunused.nim(20, 9)]' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(23, 6) Hint: 's5' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(20, 10) Hint: 's2' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(29, 6) Hint: 's11' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(27, 5) Hint: 's9' is declared but not used [XDeclaredButNotUsed]
treportunused.nim(21, 10) Hint: 's3' is declared but not used [XDeclaredButNotUsed]
Expand Down
2 changes: 1 addition & 1 deletion tests/pragmas/tused.nim
@@ -1,7 +1,7 @@
discard """
nimout: '''
compile start
tused.nim(17, 8) Hint: 'tused.echoSub(a: int, b: int)[declared in tused.nim(17, 7)]' is declared but not used [XDeclaredButNotUsed]
tused.nim(17, 8) Hint: 'echoSub' is declared but not used [XDeclaredButNotUsed]
compile end'''
output: "8\n8"
joinable: false
Expand Down

0 comments on commit eb4756f

Please sign in to comment.