Debian Codegraph @

tests/cli/wit-with-features.wit

raw
1 // RUN: component wit --features foo %
2
3 package a:b;
4
5 @unstable(feature = foo)
6 interface foo {
7 @unstable(feature = foo)
8 type t = u32;
9 }
10
11 @unstable(feature = foo)
12 interface bar {
13 @unstable(feature = foo)
14 use foo.{t};
15
16 @unstable(feature = foo)
17 record x { y: t }
18 }
19
20 @unstable(feature = foo)
21 world the-world {
22 @unstable(feature = foo)
23 import foo;
24 @unstable(feature = foo)
25 export bar;
26
27 @unstable(feature = foo)
28 import x: func();
29 @unstable(feature = foo)
30 export y: func();
31
32 @unstable(feature = foo)
33 resource thing {
34 @unstable(feature = foo)
35 constructor();
36 }
37 }
38
39 interface another-interface {
40 @unstable(feature = foo)
41 resource x {
42 @unstable(feature = foo)
43 constructor();
44
45 @unstable(feature = foo)
46 x: static func();
47
48 @unstable(feature = foo)
49 y: func();
50 }
51
52 @unstable(feature = foo)
53 variant y {
54 x(x),
55 }
56 }