Untitled
1ceb0d9
Opened by Jeffrey Yasskin at
Compiling:
use std;
import std._str;
import std.os;
unsafe fn main() {
auto name = "hello.txt";
auto name_buf = _str.buf(name);
auto fd = os.libc.open(name_buf, 0, 0u);
}
fails with:
/Users/jyasskin/tmp/sbuf_type_error.rs:8:24 - 8:41:E:Error: mismatched types: expected <native#10> but found <native#0>
That line calls os.libc.open() with a parameter of type _str.sbuf, which matches, but the type resolution doesn't seem to get it.
The error message is also ... unhelpful.
Jeffrey Yasskin at 2010-08-10 23:17:28
I believe the problem is that external_opaques in boot/me/dwarf.ml isn't used. Its mappings should be used when the typechecker compares TY_natives for equality.
Patrick Walton at 2010-08-12 01:03:41
Evil solution to the problem of importing the same opaque from two different files. Closed by 176899a970b5ccea7aea43bee31c9ee08860ab0f.
Patrick Walton at 2010-08-13 23:33:26