upd: new test in borrow-move example
This commit is contained in:
@@ -17,6 +17,14 @@ fn doSome(A a) A
|
||||
return a;
|
||||
}
|
||||
|
||||
fn doSomeNew() A
|
||||
{
|
||||
if (1 == 1)
|
||||
{
|
||||
return new A;
|
||||
}
|
||||
}
|
||||
|
||||
A a = new A;
|
||||
a.some = 0;
|
||||
printline(a);
|
||||
@@ -24,3 +32,6 @@ printline(a);
|
||||
a = doSome(a);
|
||||
printline(a);
|
||||
|
||||
b = doSomeNew();
|
||||
printline(b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user