summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/destructor/tsink.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/destructor/tsink.nim b/tests/destructor/tsink.nim
index 82cbdfbe5..e214e4cca 100644
--- a/tests/destructor/tsink.nim
+++ b/tests/destructor/tsink.nim
@@ -14,3 +14,11 @@ proc foo = # bug #23359
   doAssert bar.value == 42
 
 foo()
+
+block: # bug #23902
+  proc foo(a: sink string): auto = (a, a)
+
+  proc bar(a: sink int): auto = return a
+
+  proc foo(a: sink string) =
+    var x = (a, a)