summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
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: