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:
Alex Crichton
2023-03-08 17:15:58 -06:00
committed by GitHub
parent 8a08fedc69
commit 9141fcf8cf
3 changed files with 34 additions and 17 deletions

View 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
}