Skip to content

Commit 5af128b

Browse files
committed
test: cover plain and hyphenated namespace collisions
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent c91df40 commit 5af128b

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package a:bc;
2+
3+
interface types {
4+
resource thing;
5+
6+
record plain-bc-info {
7+
label: string,
8+
}
9+
get-plain-bc-info: func() -> plain-bc-info;
10+
}

src/tests/rust_guests/witguest/bindgen-test-cases/world.wit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ world bindgen-test-cases {
55
import b:pkg/types;
66
import c:pkg/types@1.0.0;
77
import c:pkg/types@2.0.0;
8+
import a:bc/types;
89
import a:b-c/types;
910
import a-b:c/types;
1011
import uses-a-pkg-resource;
1112
import uses-b-pkg-resource;
1213
import uses-c-pkg-v1-resource;
1314
import uses-c-pkg-v2-resource;
15+
import uses-a-bc-plain-resource;
1416
import uses-a-bc-resource;
1517
import uses-ab-c-resource;
1618
export executor;
@@ -36,6 +38,11 @@ interface uses-c-pkg-v2-resource {
3638
use-thing: func(x: borrow<thing>);
3739
}
3840

41+
interface uses-a-bc-plain-resource {
42+
use a:bc/types.{thing};
43+
use-thing: func(x: borrow<thing>);
44+
}
45+
3946
interface uses-a-bc-resource {
4047
use a:b-c/types.{thing};
4148
use-thing: func(x: borrow<thing>);

0 commit comments

Comments
 (0)