blob: f622665d082a7b27b12647ec30f143c275bb1736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// error-pattern: copying a noncopyable value
class r {
let i:int;
new(i:int) {self.i = i;}
drop {}
}
fn main() {
// This can't make sense as it would copy the classes
let i <- ~[r(0)];
let j <- ~[r(1)];
let k = i + j;
log(debug, j);
}
|