@@ -965,7 +965,7 @@ namespace cppwinrt
965965 }
966966 }
967967
968- static void write_consume_return_type (writer& w, method_signature const & signature)
968+ static void write_consume_return_type (writer& w, method_signature const & signature, bool delegate_types )
969969 {
970970 if (!signature.return_signature ())
971971 {
@@ -981,13 +981,15 @@ namespace cppwinrt
981981 %* %{};)" ;
982982
983983 w.abi_types = true ;
984+ w.delegate_types = delegate_types;
984985
985986 w.write (format,
986987 signature.return_param_name (),
987988 signature.return_signature (),
988989 signature.return_param_name ());
989990
990991 w.abi_types = false ;
992+ w.delegate_types = false ;
991993 }
992994 else if (category == param_category::object_type || category == param_category::string_type)
993995 {
@@ -1077,7 +1079,7 @@ namespace cppwinrt
10771079 bind<write_comma_generic_types>(generics),
10781080 method_name,
10791081 bind<write_consume_params>(signature),
1080- bind<write_consume_return_type>(signature),
1082+ bind<write_consume_return_type>(signature, false ),
10811083 type,
10821084 get_abi_name (method),
10831085 bind<write_abi_args>(signature),
@@ -2447,7 +2449,7 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
24472449 type_name,
24482450 bind_list (" , " , generics),
24492451 bind<write_consume_params>(signature),
2450- bind<write_consume_return_type>(signature),
2452+ bind<write_consume_return_type>(signature, true ),
24512453 type_name,
24522454 bind_list (" , " , generics),
24532455 bind<write_abi_args>(signature),
@@ -2500,7 +2502,7 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
25002502 type_name,
25012503 type_name,
25022504 bind<write_consume_params>(signature),
2503- bind<write_consume_return_type>(signature),
2505+ bind<write_consume_return_type>(signature, true ),
25042506 type_name,
25052507 bind<write_abi_args>(signature),
25062508 bind<write_consume_return_statement>(signature));
0 commit comments