mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
Cleanup comesFromPush logic (#10278)
This commit is contained in:
committed by
Andreas Rumpf
parent
09ef25810a
commit
b0979c8b1c
@@ -1054,14 +1054,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
||||
noVal(c, it)
|
||||
if sym == nil: invalidPragma(c, it)
|
||||
of wLine: pragmaLine(c, it)
|
||||
of wRaises, wTags:
|
||||
if not sym.isNil and sym.kind in {skVar, skLet, skConst}:
|
||||
if comesFromPush:
|
||||
return
|
||||
else:
|
||||
invalidPragma(c, it)
|
||||
else:
|
||||
pragmaRaisesOrTags(c, it)
|
||||
of wRaises, wTags: pragmaRaisesOrTags(c, it)
|
||||
of wLocks:
|
||||
if sym == nil: pragmaLockStmt(c, it)
|
||||
elif sym.typ == nil: invalidPragma(c, it)
|
||||
|
||||
Reference in New Issue
Block a user