diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-06-01 15:41:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 15:41:14 +0200 |
commit | 0db148163b3c3eef6206ea08a94fea06c4d226a6 (patch) | |
tree | 855300538b7b1493e908054bb4f1778e82281266 /compiler | |
parent | 00ec43305e51c4b3c0fc4f288a775f90189a4a7c (diff) | |
download | Nim-0db148163b3c3eef6206ea08a94fea06c4d226a6.tar.gz |
fixes --warningAsError implementation (#14538)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/msgs.nim | 6 |
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: |