diff options
-rw-r--r-- | compiler/lookups.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/treportunused.nim | 8 | ||||
-rw-r--r-- | tests/pragmas/tused.nim | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim index db03ac2e0..11a741505 100644 --- a/compiler/lookups.nim +++ b/compiler/lookups.nim @@ -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; diff --git a/tests/errmsgs/treportunused.nim b/tests/errmsgs/treportunused.nim index c74fea46f..b339e06bf 100644 --- a/tests/errmsgs/treportunused.nim +++ b/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] diff --git a/tests/pragmas/tused.nim b/tests/pragmas/tused.nim index 7616c1215..d0c533f9a 100644 --- a/tests/pragmas/tused.nim +++ b/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 |