First steps, the compiler can boot with enforced requiresInit

This commit is contained in:
Zahary Karadjov 2020-03-27 15:47:49 +02:00 • committed by Andreas Rumpf
commit a8b6222c86
7 changed files with 26 additions and 29 deletions

View file

@ -1088,7 +1088,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
of wRequiresInit:
noVal(c, it)
if sym.typ == nil: invalidPragma(c, it)
else: incl(sym.typ.flags, tfNeedsInit)
else: incl(sym.typ.flags, tfRequiresInit)
of wByRef:
noVal(c, it)
if sym == nil or sym.typ == nil: