Merge pull request #2274 from reactormonk/warning-for-result
Warning for result
This commit is contained in:
commit
38b9093581
3 changed files with 14 additions and 3 deletions
6
tests/exprs/tresultwarning.nim
Normal file
6
tests/exprs/tresultwarning.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
discard """
|
||||
nimout: "Special variable 'result' is shadowed. [ResultShadowed]"
|
||||
"""
|
||||
|
||||
proc test(): string =
|
||||
var result = "foo"
|
||||
Loading…
Add table
Add a link
Reference in a new issue