rust/src/test/run-pass/issue-979.rs

16 lines
194 B
Rust
Raw Normal View History

class r {
let b: @mut int;
new(b: @mut int) {
self.b = b;
}
drop { *(self.b) += 1; }
2012-03-05 20:41:55 -06:00
}
fn main() {
2012-03-26 20:35:18 -05:00
let b = @mut 0;
2012-03-05 20:41:55 -06:00
{
let p = some(r(b));
}
assert *b == 1;
}