summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2020-03-27 15:47:49 +0200
committerAndreas Rumpf <rumpf_a@web.de>2020-04-01 19:38:44 +0200
commita8b6222c862d207a32c104699fc4f0f0a8bced17 (patch)
tree73c3d36d385758386d6dc8d4e0c449e3fda783ff /compiler/semstmts.nim
parent216fd59c44c7eb56431748389e3b2116692189a1 (diff)
downloadNim-a8b6222c862d207a32c104699fc4f0f0a8bced17.tar.gz
First steps, the compiler can boot with enforced requiresInit
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index b45c42fe1..057972f0a 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -336,7 +336,7 @@ proc semIdentDef(c: PContext, n: PNode, kind: TSymKind): PSym =
 
 proc checkNilable(c: PContext; v: PSym) =
   if {sfGlobal, sfImportc} * v.flags == {sfGlobal} and
-      {tfNotNil, tfNeedsInit} * v.typ.flags != {}:
+      {tfNotNil, tfRequiresInit} * v.typ.flags != {}:
     if v.astdef.isNil:
       message(c.config, v.info, warnProveInit, v.name.s)
     elif tfNotNil in v.typ.flags and not v.astdef.typ.isNil and tfNotNil notin v.astdef.typ.flags: