mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
added test for result shadow warning
This commit is contained in:
7
tests/exprs/tresultwarning.nim
Normal file
7
tests/exprs/tresultwarning.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
msg: "Special variable 'result' is shadowed. [ResultShadowed]"
|
||||
line: 7
|
||||
"""
|
||||
|
||||
proc test(): string =
|
||||
var result = "foo"
|
||||
Reference in New Issue
Block a user