Add a test that assignment of unique boxes to locals does a copy

Issue #409
This commit is contained in:
Brian Anderson 2011-09-22 13:39:03 -07:00
parent 67bac873e0
commit 7c4fe10f02

View File

@ -0,0 +1,10 @@
fn main() {
let i = ~mutable 1;
// Should be a copy
let j;
j = i;
*i = 2;
*j = 3;
assert *i == 2;
assert *j == 3;
}