{.deprecated: msg.} now works for vars and lets (#10234)
This commit is contained in:
parent
d0366c5194
commit
fb26b95f81
4 changed files with 16 additions and 10 deletions
|
|
@ -881,7 +881,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
|||
of wExplain:
|
||||
sym.flags.incl sfExplain
|
||||
of wDeprecated:
|
||||
if sym != nil and sym.kind in routineKinds + {skType}:
|
||||
if sym != nil and sym.kind in routineKinds + {skType, skVar, skLet}:
|
||||
if it.kind in nkPragmaCallKinds: discard getStrLitNode(c, it)
|
||||
incl(sym.flags, sfDeprecated)
|
||||
elif sym != nil and sym.kind != skModule:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue