summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-06-01 15:41:14 +0200
committerGitHub <noreply@github.com>2020-06-01 15:41:14 +0200
commit0db148163b3c3eef6206ea08a94fea06c4d226a6 (patch)
tree855300538b7b1493e908054bb4f1778e82281266 /compiler
parent00ec43305e51c4b3c0fc4f288a775f90189a4a7c (diff)
downloadNim-0db148163b3c3eef6206ea08a94fea06c4d226a6.tar.gz
fixes --warningAsError implementation (#14538)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/msgs.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 0e64d9327..c4658abcf 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -494,8 +494,12 @@ proc liMessage(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
   of warnMin..warnMax:
     sev = Severity.Warning
     ignoreMsg = not conf.hasWarn(msg)
+    if msg in conf.warningAsErrors:
+      ignoreMsg = false
+      title = ErrorTitle
+    else:
+      title = WarningTitle
     if not ignoreMsg: writeContext(conf, info)
-    title = if msg in conf.warningAsErrors: ErrorTitle else: WarningTitle
     color = WarningColor
     inc(conf.warnCounter)
   of hintMin..hintMax: