Skip to content

wit-encoder: use statements are ignored in WorldItem::InlineInterfaceExport. #2387

@ouillie

Description

@ouillie

I have a test to illustrate this. At trunk, when you run the test, you get this:

Diff < left / right > :
 package foo:bar;
 
 world the-world {
   export the-interface: interface {
>    use types.{ the-type as the-import };
     the-function: func(the-parameter: the-import);
   }
 }
 
 interface types {
   record the-type {  }
 }

Indicating that the statement inline_interface.use_type("types", "the-type", Some(Ident::from("the-import"))) on line 31 is effectively being ignored.

Drafting up a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions