blob: 843694a405a87a7bc5e22a4369f3bde48477c64a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
// expect error: x: drop is already set
// destructors 2: a value's drop can be set only once
include rt;
fn main() {
int* x = rt.new(int);
x.drop = fn() { rt.put_s("a"); };
x.drop = fn() { rt.put_s("b"); };
return 0;
}
// zc0: skip
|