Test case for #3012
This commit is contained in:
parent
0d7bef4d48
commit
ee2f0dd638
12
src/test/auxiliary/issue-3012-1.rs
Normal file
12
src/test/auxiliary/issue-3012-1.rs
Normal 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); */ }
|
||||
}
|
||||
}
|
8
src/test/run-pass/issue-3012-2.rs
Normal file
8
src/test/run-pass/issue-3012-2.rs
Normal 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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user