'.push raises: []' now also affects proc types (#13776)
* '.push raises: []' now also affects proc types * fixes the regression * less disruptive bugfix * another attempt
This commit is contained in:
parent
06f8c5cb6f
commit
2a278f6eba
5 changed files with 32 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ const
|
|||
wTags, wLocks, wGcSafe}
|
||||
exprPragmas* = {wLine, wLocks, wNoRewrite, wGcSafe, wNoSideEffect}
|
||||
stmtPragmas* = {wChecks, wObjChecks, wFieldChecks, wRangeChecks,
|
||||
wBoundChecks, wOverflowChecks, wNilChecks, wStaticBoundchecks,
|
||||
wBoundChecks, wOverflowChecks, wNilChecks, wStaticBoundchecks,
|
||||
wStyleChecks, wAssertions,
|
||||
wWarnings, wHints,
|
||||
wLineDir, wStackTrace, wLineTrace, wOptimization, wHint, wWarning, wError,
|
||||
|
|
@ -1029,7 +1029,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
|||
of wCodegenDecl: processCodegenDecl(c, it, sym)
|
||||
of wChecks, wObjChecks, wFieldChecks, wRangeChecks, wBoundChecks,
|
||||
wOverflowChecks, wNilChecks, wAssertions, wWarnings, wHints,
|
||||
wLineDir, wOptimization, wStaticBoundchecks, wStyleChecks,
|
||||
wLineDir, wOptimization, wStaticBoundchecks, wStyleChecks,
|
||||
wCallconv, wDebugger, wProfiler,
|
||||
wFloatChecks, wNanChecks, wInfChecks, wPatterns, wTrMacros:
|
||||
processOption(c, it, c.config.options)
|
||||
|
|
@ -1147,7 +1147,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
|||
else: sym.flags.incl sfUsed
|
||||
of wLiftLocals: discard
|
||||
else: invalidPragma(c, it)
|
||||
elif comesFromPush and whichKeyword(ident) in {wTags, wRaises}:
|
||||
elif comesFromPush and whichKeyword(ident) != wInvalid:
|
||||
discard "ignore the .push pragma; it doesn't apply"
|
||||
else:
|
||||
if sym == nil or (sym.kind in {skVar, skLet, skParam,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue