summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2020-04-01 03:33:32 +0300
committerAndreas Rumpf <rumpf_a@web.de>2020-04-01 19:38:44 +0200
commitbe95f8fdfac9ceb559f77b55630ca9e285fa9a2d (patch)
treec4819894e2f0fdf8a720795880ece26c8e5e5795 /compiler/sempass2.nim
parentce9a4ed124d798d0287a62e4700a32f1d15878c9 (diff)
downloadNim-be95f8fdfac9ceb559f77b55630ca9e285fa9a2d.tar.gz
Turn some of the errors back into warnings
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r--compiler/sempass2.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index 79d969fbb..a4e1dcf00 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -254,7 +254,7 @@ proc useVar(a: PEffects, n: PNode) =
       a.init.add s.id
     elif s.id notin a.init:
       if s.typ.requiresInit:
-        localError(a.config, n.info, errProveInit, s.name.s)
+        message(a.config, n.info, warnProveInit, s.name.s)
       else:
         message(a.config, n.info, warnUninit, s.name.s)
       # prevent superfluous warnings about the same variable:
@@ -844,7 +844,7 @@ proc track(tracked: PEffects, n: PNode) =
           # var s: seq[notnil];  newSeq(s, 0)  is a special case!
           discard
         else:
-          localError(tracked.config, arg.info, errProveInit, $arg)
+          message(tracked.config, arg.info, warnProveInit, $arg)
 
       # check required for 'nim check':
       if n[1].typ.len > 0:
@@ -1209,7 +1209,7 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
      s.kind in {skProc, skFunc, skConverter, skMethod}:
     var res = s.ast[resultPos].sym # get result symbol
     if res.id notin t.init:
-      localError(g.config, body.info, errProveInit, "result")
+      message(g.config, body.info, warnProveInit, "result")
   let p = s.ast[pragmasPos]
   let raisesSpec = effectSpec(p, wRaises)
   if not isNil(raisesSpec):