added a warning that the .deprecate statement is unreliable for routines
This commit is contained in:
parent
0e67fc7450
commit
58187f2120
7 changed files with 5 additions and 15 deletions
|
|
@ -626,7 +626,8 @@ proc deprecatedStmt(c: PContext; pragma: PNode) =
|
|||
for n in pragma:
|
||||
if n.kind in {nkExprColonExpr, nkExprEqExpr}:
|
||||
let dest = qualifiedLookUp(c, n[1], {checkUndeclared})
|
||||
assert dest != nil
|
||||
if dest == nil or dest.kind in routineKinds:
|
||||
localError(n.info, warnUser, "the .deprecated pragma is unreliable for routines")
|
||||
let src = considerQuotedIdent(n[0])
|
||||
let alias = newSym(skAlias, src, dest, n[0].info)
|
||||
incl(alias.flags, sfExported)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue