mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-18 07:21:24 +00:00
Add OptionalAndUnionArguments test
This commit is contained in:
@ -789,7 +789,10 @@ impl<'src> WebidlParse<'src, &'src str> for weedle::interface::ConstMember<'src>
|
||||
};
|
||||
|
||||
let ty = match idl_type.to_syn_type(TypePosition::Return) {
|
||||
None => return Ok(()),
|
||||
None => {
|
||||
warn!("Can not convert const type to syn type: {:?}", idl_type);
|
||||
return Ok(());
|
||||
},
|
||||
Some(ty) => ty,
|
||||
};
|
||||
|
||||
|
@ -234,7 +234,10 @@ impl<'src> FirstPassRecord<'src> {
|
||||
IdlType::Void => None,
|
||||
ret @ _ => {
|
||||
match ret.to_syn_type(TypePosition::Return) {
|
||||
None => return Vec::new(),
|
||||
None => {
|
||||
warn!("Can not convert return type to syn type: {:?}", ret);
|
||||
return Vec::new();
|
||||
},
|
||||
Some(ret) => Some(ret),
|
||||
}
|
||||
},
|
||||
@ -312,6 +315,7 @@ impl<'src> FirstPassRecord<'src> {
|
||||
let syn_type = if let Some(syn_type) = idl_type.to_syn_type(TypePosition::Argument) {
|
||||
syn_type
|
||||
} else {
|
||||
warn!("Can not convert argument type to syn type: {:?}", idl_type);
|
||||
continue 'outer;
|
||||
};
|
||||
let argument_name = rust_ident(&argument_name.to_snake_case());
|
||||
|
Reference in New Issue
Block a user