rust/src/test/run-pass/issue-2487-a.rs
Tim Chevalier 0327dc0b18 Insert missing maybe_print_comment call for class destructors
While it wasn't the original issue, the first program from #2487
failed the pretty-printing test because of this, so it's still a good
test case :-)

It also turns out that the second program from #2487 now triggers a
kind error, so I figured I might as well add it as a test case.
2012-06-06 22:09:10 -07:00

20 lines
268 B
Rust

class socket {
let sock: int;
new() { self.sock = 1; }
drop { }
fn set_identity() {
closure { ||
setsockopt_bytes(copy self.sock)
}
}
}
fn closure(f: fn()) { f() }
fn setsockopt_bytes(_sock: int) { }
fn main() {}