summary refs log tree commit diff stats
path: root/tests/arc/t17812.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc/t17812.nim')
-rw-r--r--tests/arc/t17812.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/arc/t17812.nim b/tests/arc/t17812.nim
index bcd5f3a93..dd8ac89b0 100644
--- a/tests/arc/t17812.nim
+++ b/tests/arc/t17812.nim
@@ -27,3 +27,15 @@ block: # bug #17812
     proc `$`(o: MyObj): string = o.repr
 
     doAssert ($MyObj()).len > 0
+
+# bug #22175
+
+type Xxx = object
+  value: string
+
+proc complete(xxx: ref Xxx, v: sink string) =
+  xxx.value = move(v)
+
+let yyy = (ref Xxx)()
+
+yyy.complete("test")