2011-11-18 16:15:46 +01:00
|
|
|
resource r(i: @mutable int) { *i += 1; }
|
2011-09-27 22:40:15 -07:00
|
|
|
|
|
|
|
fn main() {
|
2011-11-18 16:15:46 +01:00
|
|
|
let i = @mutable 0;
|
|
|
|
// Even though these look like copies, they are guaranteed not to be
|
|
|
|
{
|
|
|
|
let a = r(i);
|
|
|
|
let b = (a, 10);
|
|
|
|
let (c, _d) = b;
|
2011-12-22 17:53:53 -08:00
|
|
|
log(debug, c);
|
2011-11-18 16:15:46 +01:00
|
|
|
}
|
|
|
|
assert *i == 1;
|
|
|
|
}
|