Closed
Description
In https://github.com/jdm/rust-socket there is code like this:
export socket_handle;
class socket_handle {
let sockfd: libc::c_int;
new(x: libc::c_int) {self.sockfd = x;}
drop {c::close(self.sockfd);}
}
From a different crate I do:
import socket;
let sock = @socket::socket_handle(fd);
And I get:
src/connection.rs:37:13: 37:39 error: mismatched types: expected function or foreign function but found socket::socket_handle
src/connection.rs:37 let sock = @socket::socket_handle(fd);
This is with rust f676547
Work around for now is to export a function that calls the ctor for me.
(I know instance construction is being actively worked on atm, but it seems like there may be a missing unit test for this case).