Add an xfailed test for bogus deep copying of things containing resources

This commit is contained in:
Brian Anderson 2011-09-27 14:28:20 -07:00
parent 4bffa5e13a
commit 1097463d96

View file

@ -0,0 +1,16 @@
// xfail-test
// expected error: mismatched kinds
resource r(i: @mutable int) {
*i = *i + 1;
}
fn main() {
let i = @mutable 0;
{
// Can't do this copy
let x = ~~~{y: r(i)};
let z = x;
}
log_err *i;
}