Skip to content

Commit

Permalink
Add to the output the non generics behavior types
Browse files Browse the repository at this point in the history
  • Loading branch information
Anaethelion committed Nov 4, 2024
1 parent a0f6308 commit 1d4b6e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compiler-rs/clients_schema/src/transform/expand_generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ pub fn expand(model: IndexedModel, config: ExpandConfig) -> anyhow::Result<Index
itf.inherits = Some(expand_inherits(inherit, &mappings, model, ctx)?);
}

if !itf.behaviors.is_empty() {
itf.behaviors.iter().for_each(|b| {
if b.generics.is_empty() {
// If the behavior has no generics, we can just expand it
let _ = expand_type(&b.typ, Vec::new(), model, ctx);
}
});
}

// We keep the generic parameters of behaviors, but expand their value
for behavior in &mut itf.behaviors {
for arg in &mut behavior.generics {
Expand Down
Binary file modified compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm
Binary file not shown.

0 comments on commit 1d4b6e2

Please sign in to comment.