From c6235920cbb4a10b03889926ed7d7e2b699ae465 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 28 Oct 2017 13:46:43 +0200 Subject: backend preparations for incomplete/forwarded object types --- compiler/pragmas.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/pragmas.nim') 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) -- cgit 1.4.1-2-gfad0