Remove temporary _test_borrow2 directory

This commit is contained in:
2026-06-05 21:56:54 +03:00
parent 636c49e9df
commit a7f96c8e0d
2 changed files with 0 additions and 39 deletions
-1
View File
@@ -1 +0,0 @@
[Package]
-38
View File
@@ -1,38 +0,0 @@
import Std::Io::{PrintLine};
@[Checked]
func Take(x: own String) {
PrintLine(x);
}
@[Checked]
func UseAfterMoveReinit() {
var s: own String = "hello";
Take(s);
/* s is moved here */
/* PrintLine(s); */ /* would error */
s = "reinitialized";
/* s is valid again after reinitialization */
PrintLine(s);
}
@[Checked]
func MoveInAssign() {
var a: own String = "A";
var b: own String = a; /* a is moved to b */
PrintLine(b);
/* PrintLine(a); */ /* would error */
}
@[Checked]
func MoveInReturn() -> own String {
var x: own String = "returned";
return x; /* x is moved */
}
func Main() -> int {
UseAfterMoveReinit();
MoveInAssign();
PrintLine(MoveInReturn());
return 0;
}