fixes #23759; rework move for refc (#23764)

fixes #23759
This commit is contained in:
ringabout
2024-06-29 16:43:41 +08:00
committed by GitHub
parent 828cd58d8a
commit 56ed4e0bb9
3 changed files with 18 additions and 3 deletions

View File

@@ -15,3 +15,12 @@ var obj = AnObject(value: 42)
echo "Value is: ", obj.value
mutate(obj)
echo "Value is: ", obj.value
proc p(x: sink string) =
var y = move(x)
doAssert x.len == 0
doAssert y.len == 4
p("1234")
var s = "oooo"
p(s)