diff options
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index afb51da09..442695ea1 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -413,7 +413,7 @@ proc handleError(conf: ConfigRef; msg: TMsgKind, eh: TErrorHandling, s: string) if conf.cmd == cmdIdeTools: log(s) quit(conf, msg) if msg >= errMin and msg <= errMax or - (msg in warnMin..warnMax and msg in conf.warningAsErrors): + (msg in warnMin..hintMax and msg in conf.warningAsErrors): inc(conf.errorCounter) conf.exitcode = 1'i8 if conf.errorCounter >= conf.errorMax: @@ -522,7 +522,11 @@ proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string, of hintMin..hintMax: sev = Severity.Hint ignoreMsg = not conf.hasHint(msg) - title = HintTitle + if msg in conf.warningAsErrors: + ignoreMsg = false + title = ErrorTitle + else: + title = HintTitle color = HintColor inc(conf.hintCounter) |