summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2015-03-05 14:44:50 -0600
committerSimon Hafner <hafnersimon@gmail.com>2015-03-05 14:44:50 -0600
commitf592240c545506448e2bea78a2fa3404c7f46e69 (patch)
treee3f41a2449d6aed97dc039f75004f9e4e567b24e
parenta1d813d12cf04207a07e27e20751d5db053bb029 (diff)
downloadNim-f592240c545506448e2bea78a2fa3404c7f46e69.tar.gz
added test for result shadow warning
-rw-r--r--tests/exprs/tresultwarning.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/exprs/tresultwarning.nim b/tests/exprs/tresultwarning.nim
new file mode 100644
index 000000000..985ca2efa
--- /dev/null
+++ b/tests/exprs/tresultwarning.nim
@@ -0,0 +1,7 @@
+discard """
+  msg: "Special variable 'result' is shadowed. [ResultShadowed]"
+  line: 7
+"""
+
+proc test(): string =
+  var result = "foo"