Closed
Description
See the following code:
mod a {
extern {
fn my_fn(a: *u8);
}
}
mod b {
extern {
fn my_fn(a: *u16);
}
}
fn main() { }
Compiling it causes the following error:
Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", file c:/Users/philii/rust/src/llvm/include/llvm/Support/Casting.h, line 231
I am not sure what the correct handling of this case should be. One easy solution would be to disallow multiple declarations of the same extern function in the same crate.