This commit is contained in:
flywind 2020-07-09 15:57:35 +08:00 • committed by GitHub
commit 40b58a0a18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -557,7 +557,12 @@ proc markUsed(c: PContext; info: TLineInfo; s: PSym) =
if sfDeprecated in s.owner.flags:
warnAboutDeprecated(conf, info, s)
if {sfDeprecated, sfError} * s.flags != {}:
if sfDeprecated in s.flags: warnAboutDeprecated(conf, info, s)
if sfDeprecated in s.flags:
if not (c.lastTLineInfo.line == info.line and
c.lastTLineInfo.col == info.col):
warnAboutDeprecated(conf, info, s)
c.lastTLineInfo = info
if sfError in s.flags: userError(conf, info, s)
when defined(nimsuggest):
suggestSym(conf, info, s, c.graph.usageSym, false)