From 0db148163b3c3eef6206ea08a94fea06c4d226a6 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 1 Jun 2020 15:41:14 +0200 Subject: [PATCH] fixes --warningAsError implementation (#14538) --- compiler/msgs.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 0e64d93274..c4658abcfe 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: