components: Fix support for 0-sized flags (#4560)
This commit goes through and updates support in the various argument passing routines to support 0-sized flags. A bit of a degenerate case but clarified in WebAssembly/component-model#76 as intentional.
This commit is contained in:
@@ -210,7 +210,9 @@ fn make_echo_component(type_definition: &str, type_size: u32) -> String {
|
||||
}
|
||||
|
||||
fn make_echo_component_with_params(type_definition: &str, params: &[Param]) -> String {
|
||||
let func = if params.len() == 1 || params.len() > 16 {
|
||||
let func = if params.len() == 0 {
|
||||
format!("(func (export \"echo\"))")
|
||||
} else if params.len() == 1 || params.len() > 16 {
|
||||
let primitive = if params.len() == 1 {
|
||||
params[0].0.primitive()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user