Cleanup comesFromPush logic (#10278)

This commit is contained in:
Neelesh Chandola 2019-01-11 23:46:03 +05:30 • committed by Andreas Rumpf
commit b0979c8b1c

View file

@ -1054,14 +1054,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
noVal(c, it) noVal(c, it)
if sym == nil: invalidPragma(c, it) if sym == nil: invalidPragma(c, it)
of wLine: pragmaLine(c, it) of wLine: pragmaLine(c, it)
of wRaises, wTags: of wRaises, wTags: pragmaRaisesOrTags(c, it)
if not sym.isNil and sym.kind in {skVar, skLet, skConst}:
if comesFromPush:
return
else:
invalidPragma(c, it)
else:
pragmaRaisesOrTags(c, it)
of wLocks: of wLocks:
if sym == nil: pragmaLockStmt(c, it) if sym == nil: pragmaLockStmt(c, it)
elif sym.typ == nil: invalidPragma(c, it) elif sym.typ == nil: invalidPragma(c, it)