feature: the compiler can warn when you use the implicit 'result' variable (#17988) [backport:1.2]

* implements #17855
This commit is contained in:
Andreas Rumpf 2021-05-10 23:41:51 +02:00 • committed by GitHub
commit 378ee7f888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -402,7 +402,7 @@ proc hasHint*(conf: ConfigRef, note: TNoteKind): bool =
note in conf.mainPackageNotes
else: note in conf.notes
proc hasWarn*(conf: ConfigRef, note: TNoteKind): bool =
proc hasWarn*(conf: ConfigRef, note: TNoteKind): bool {.inline.} =
optWarns in conf.options and note in conf.notes
proc hcrOn*(conf: ConfigRef): bool = return optHotCodeReloading in conf.globalOptions