diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-10-28 13:46:43 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-10-28 13:46:43 +0200 |
commit | c6235920cbb4a10b03889926ed7d7e2b699ae465 (patch) | |
tree | 35df513e2eb8665e8ae07674d5b57785275b39eb /compiler/pragmas.nim | |
parent | dcfc2b0e5f94a3a6daf1e30dc337470702c662eb (diff) | |
download | Nim-c6235920cbb4a10b03889926ed7d7e2b699ae465.tar.gz |
backend preparations for incomplete/forwarded object types
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index bc3771700..ab896716d 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -55,7 +55,7 @@ const wPure, wHeader, wCompilerproc, wFinal, wSize, wExtern, wShallow, wImportCpp, wImportObjC, wError, wIncompleteStruct, wByCopy, wByRef, wInheritable, wGensym, wInject, wRequiresInit, wUnchecked, wUnion, wPacked, - wBorrow, wGcSafe, wExportNims, wPartial, wUsed, wExplain} + wBorrow, wGcSafe, wExportNims, wPartial, wUsed, wExplain, wForward} fieldPragmas* = {wImportc, wExportc, wDeprecated, wExtern, wImportCpp, wImportObjC, wError, wGuard, wBitsize, wUsed} varPragmas* = {wImportc, wExportc, wVolatile, wRegister, wThreadVar, wNodecl, @@ -799,6 +799,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int, noVal(it) if sym.typ == nil or tfFinal in sym.typ.flags: invalidPragma(it) else: incl(sym.typ.flags, tfInheritable) + of wForward: + noVal(it) + if sym.typ == nil: invalidPragma(it) + else: incl(sym.flags, sfForward) of wAcyclic: noVal(it) if sym.typ == nil: invalidPragma(it) |