crates/wit-parser/tests/ui/worlds-with-types.wit
raw| 1 | package foo:foo; |
| 2 | |
| 3 | world foo { |
| 4 | type a = u32; |
| 5 | type b = a; |
| 6 | |
| 7 | export c: func(a: a) -> b; |
| 8 | } |
| 9 | |
| 10 | |
| 11 | interface disambiguate { |
| 12 | type t = u32; |
| 13 | } |
| 14 | |
| 15 | world bar { |
| 16 | import disambiguate; |
| 17 | |
| 18 | use disambiguate.{t}; |
| 19 | |
| 20 | export foo: func() -> t; |
| 21 | } |
| 22 | |
| 23 | world the-test { |
| 24 | record a { |
| 25 | x: u32, |
| 26 | } |
| 27 | |
| 28 | variant b { |
| 29 | c(a), |
| 30 | } |
| 31 | |
| 32 | import foo: func(a: a) -> b; |
| 33 | export bar: func(a: a) -> b; |
| 34 | } |