-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
gen-cppRelated to the C++ code generatorRelated to the C++ code generator
Description
Summary
Another bucket of issues in wit-bindgen cpp.
Each one still makes the generated C++ fail to compile, possibly due to name collisions.
I can split this bucket into separate issues if needed.
Environment
- wit-bindgen-cli: 0.47.0
- OS: Ubuntu 22.04.5 LTS (x86_64)
Same compile command: clang++ -c "$OUT/w.cpp" -I"$OUT" -o "$OUT/w.o".
Details
Sub-issue 1
Reproduction
package demo:poc;
world w {
export a: interface {
f: func() -> u32;
}
export b: interface {
f: func() -> u64;
}
}
Sub-issue 2
Reproduction
package namespace:demo;
interface i {
f: func();
}
world w {
export i;
}
Sub-issue 3
Reproduction
package demo:poc;
world w {
import foo: func(ptr0: string) -> u32;
}
Sub-issue 4
Reproduction
package demo:poc;
world w {
import foo: func(class: u32) -> u32;
}
Sub-issue 5
Reproduction
package demo:poc;
interface i {
record t {
ret: u32,
}
foo: func(x: t);
}
world w {
import i;
}
Sub-issue 6
Reproduction
package demo:poc;
interface i {
variant v {
v,
}
f: func(x: v);
}
world w {
export i;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gen-cppRelated to the C++ code generatorRelated to the C++ code generator