diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/objc.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ir/objc.rs b/src/ir/objc.rs index cabbd389..0f72c399 100644 --- a/src/ir/objc.rs +++ b/src/ir/objc.rs @@ -236,13 +236,21 @@ impl ObjCMethod { ); } + // Get arguments without type signatures to pass to `msg_send!` + let mut args_without_types = vec![]; + for arg in args.iter() { + let name_and_sig: Vec<&str> = arg.as_str().split(' ').collect(); + let name = name_and_sig[0]; + args_without_types.push(quote::Ident::new(name)) + }; + let args = split_name .into_iter() - .zip(args.iter()) - .map(|(arg, ty)| quote! { #arg : #ty }); + .zip(args_without_types) + .map(|(arg, arg_val)| quote! { #arg : #arg_val }); quote! { - #( #args ),* + #( #args )* } } } |