summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-10 13:57:03 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-10 13:57:03 +0200
commit1063085850d9d32e82302854cf3ac64049bf998f (patch)
treefd8fe4273c23582b2f8374c47dedfe7d903e1fd6
parent13f974336eff453fe4384ef2566f069b6fde75a1 (diff)
downloadNim-1063085850d9d32e82302854cf3ac64049bf998f.tar.gz
fixes #6474
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index a4dd8f354..a83de6d27 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -384,7 +384,7 @@ proc checkNilable(v: PSym) =
       {tfNotNil, tfNeedsInit} * v.typ.flags != {}:
     if v.ast.isNil:
       message(v.info, warnProveInit, v.name.s)
-    elif tfNeedsInit in v.typ.flags and tfNotNil notin v.ast.typ.flags:
+    elif tfNotNil in v.typ.flags and tfNotNil notin v.ast.typ.flags:
       message(v.info, warnProveInit, v.name.s)
 
 include semasgn