summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJake Leahy <jake@leahy.dev>2022-12-22 18:25:24 +1100
committerGitHub <noreply@github.com>2022-12-22 08:25:24 +0100
commit70fe360456b77912ec7f5014f7815137fa089fce (patch)
tree259f76154993b7bd198d52d67cf2588b9bad8905
parentc5a72ebddd88b6d3a2712230d36367f180faa7da (diff)
downloadNim-70fe360456b77912ec7f5014f7815137fa089fce.tar.gz
Use `ErrorColor` when a warning that is turned into an error is raised (#21131)
Use ErrorColor when a warning that is turned into an error is raised
-rw-r--r--compiler/msgs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 8b44c8dc6..8e391f2fb 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -541,10 +541,11 @@ proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
     ignoreMsg = not conf.hasWarn(msg)
     if not ignoreMsg and msg in conf.warningAsErrors:
       title = ErrorTitle
+      color = ErrorColor
     else:
       title = WarningTitle
+      color = WarningColor
     if not ignoreMsg: writeContext(conf, info)
-    color = WarningColor
     inc(conf.warnCounter)
   of hintMin..hintMax:
     sev = Severity.Hint