fixes #2590; methods now require a .base annotation

This commit is contained in:
Araq 2015-09-06 02:29:30 +02:00
commit dc047931bb
17 changed files with 69 additions and 32 deletions

View file

@ -27,7 +27,7 @@ const
wGensym, wInject, wRaises, wTags, wLocks, wDelegator, wGcSafe,
wOverride, wConstructor}
converterPragmas* = procPragmas
methodPragmas* = procPragmas
methodPragmas* = procPragmas+{wBase}
templatePragmas* = {wImmediate, wDeprecated, wError, wGensym, wInject, wDirty,
wDelegator}
macroPragmas* = {FirstCallConv..LastCallConv, wImmediate, wImportc, wExportc,
@ -867,6 +867,9 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int,
localError(it.info, "'experimental' pragma only valid as toplevel statement")
of wNoRewrite:
noVal(it)
of wBase:
noVal(it)
sym.flags.incl sfBase
else: invalidPragma(it)
else: invalidPragma(it)