If we generate bindings for the following world foo:
package wit:repro
interface foo1 {
foo: func()
}
interface foo2 {
foo: func()
}
world foo {
export foo1
export foo2
}
The export_foo macro will generate the following conflicting decls:
// ...
macro_rules! export_foo(($t:ident) => {
const _: () = {
#[doc(hidden)]
#[export_name = "wit:repro/foo1#foo"]
#[allow(non_snake_case)]
unsafe extern "C" fn __export_foo() {
bindings::exports::wit::repro::foo1::call_foo::<$t>()
}
#[doc(hidden)]
#[export_name = "wit:repro/foo2#foo"]
#[allow(non_snake_case)]
unsafe extern "C" fn __export_foo() {
bindings::exports::wit::repro::foo2::call_foo::<$t>()
}
};
// ...
The code that generates these decls uses just the method name.
The name should be based on the qualified name of the interface as well.
If we generate bindings for the following world
foo:The
export_foomacro will generate the following conflicting decls:The code that generates these decls uses just the method name.
The name should be based on the qualified name of the interface as well.