components: Fix bindgen! with renamed interfaces (#5968)
This follows the same strategy pioneered by the `wit-bindgen` guest Rust bindgen which keeps track of the latest name of an interface for how to refer to an interface. Closes #5961
This commit is contained in:
14
crates/component-macro/tests/codegen/rename.wit
Normal file
14
crates/component-macro/tests/codegen/rename.wit
Normal file
@@ -0,0 +1,14 @@
|
||||
interface red {
|
||||
use self.green.{thing}
|
||||
|
||||
foo: func() -> thing
|
||||
}
|
||||
|
||||
interface green {
|
||||
type thing = s32
|
||||
}
|
||||
|
||||
default world neptune {
|
||||
import blue: self.red
|
||||
import orange: self.green
|
||||
}
|
||||
Reference in New Issue
Block a user