Test case for #3012

This commit is contained in:
Tim Chevalier 2012-08-15 18:34:28 -07:00
parent 0d7bef4d48
commit ee2f0dd638
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#[link(name="socketlib", vers="0.0")];
mod socket {
export socket_handle;
class socket_handle {
let sockfd: libc::c_int;
new(x: libc::c_int) {self.sockfd = x;}
drop { /* c::close(self.sockfd); */ }
}
}

View File

@ -0,0 +1,8 @@
// aux-build:issue-3012-1.rs
use socketlib;
import socketlib::socket;
fn main() {
let fd: libc::c_int = 1 as libc::c_int;
let sock = @socket::socket_handle(fd);
}