summary refs log tree commit diff stats
path: root/tests/closure/t15594.nim
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-02 21:16:33 +0800
committerGitHub <noreply@github.com>2020-11-02 14:16:33 +0100
commiteb429988cd15555f2af35389d52256b06e00e900 (patch)
treec627c3407d043ab42b2027df3161dff3cfaec038 /tests/closure/t15594.nim
parent6fa82a5b3afbe644eef3fb41647a341d8e9b21c4 (diff)
downloadNim-eb429988cd15555f2af35389d52256b06e00e900.tar.gz
fixes #15594 (#15819)
Diffstat (limited to 'tests/closure/t15594.nim')
-rw-r--r--tests/closure/t15594.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/closure/t15594.nim b/tests/closure/t15594.nim
new file mode 100644
index 000000000..aacd9ed84
--- /dev/null
+++ b/tests/closure/t15594.nim
@@ -0,0 +1,10 @@
+discard """
+  errormsg: "The variable name cannot be `result`!"
+"""
+
+import sugar
+
+proc begin(): int =
+  capture result:
+    echo 1+1
+  result