summary refs log tree commit diff stats
path: root/tests/closure/t15594.nim
diff options
context:
space:
mode:
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