Remove duplicate line number from 'invalid forward declaration' error (#11966)

This commit is contained in:
nc-x 2019-08-17 14:05:25 +05:30 • committed by Andreas Rumpf
commit cf09ef47b8
3 changed files with 8 additions and 7 deletions

View file

@ -72,8 +72,8 @@ proc searchForProcNew(c: PContext, scope: PScope, fn: PSym): PSym =
of paramsEqual:
if (sfExported notin result.flags) and (sfExported in fn.flags):
let message = ("public implementation '$1' has non-public " &
"forward declaration in $2") %
[getProcHeader(c.config, result), c.config$result.info]
"forward declaration at $2") %
[getProcHeader(c.config, result, getDeclarationPath = false), c.config$result.info]
localError(c.config, fn.info, message)
return
of paramsIncompatible: