summary refs log tree commit diff stats
path: root/tests/arc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2023-07-06 15:15:50 +0200
committerGitHub <noreply@github.com>2023-07-06 15:15:50 +0200
commita15db5d60b39a24886c692bc9a4e2cb3d5d33ef2 (patch)
tree687d461e6065cddb0a3c705c938d8455cab45077 /tests/arc
parentdfa0d2569e772d6fc4568796db03f65dc2e94771 (diff)
downloadNim-a15db5d60b39a24886c692bc9a4e2cb3d5d33ef2.tar.gz
fixes #22175 (#22229)
Diffstat (limited to 'tests/arc')
-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")