crates/wit-parser/tests/ui/parse-fail/import-and-export4.wit
raw| 1 | package foo:foo; |
| 2 | |
| 3 | |
| 4 | world union-world { |
| 5 | include test; |
| 6 | include a-different-world; |
| 7 | include the-world; |
| 8 | } |
| 9 | |
| 10 | interface foo {} |
| 11 | interface bar {} |
| 12 | |
| 13 | world the-world { |
| 14 | import foo; |
| 15 | import bar; |
| 16 | import baz: interface { |
| 17 | foo: func(); |
| 18 | } |
| 19 | export foo; |
| 20 | export bar; |
| 21 | export baz2: interface { |
| 22 | foo: func(); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | world a-different-world { |
| 27 | import foo; |
| 28 | } |
| 29 | |
| 30 | interface i1 { |
| 31 | type t = u32; |
| 32 | } |
| 33 | interface i2 { |
| 34 | use i1.{t}; |
| 35 | } |
| 36 | interface i3 { |
| 37 | use i2.{t}; |
| 38 | } |
| 39 | |
| 40 | world test { |
| 41 | import i3; |
| 42 | export i1; |
| 43 | export i3; |
| 44 | } |