mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user