var ccall = new CCodeFunctionCall (get_cvalue (expr.call));
CCodeFunctionCall async_call = null;
+ CCodeFunctionCall finish_call = null;
Method m = null;
Delegate deleg = null;
// async call
async_call = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_name (m)));
- var finish_call = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_finish_name (m)));
+ finish_call = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_finish_name (m)));
if (ma.inner is BaseAccess) {
if (m.base_method != null) {
}
} else if (m is CreationMethod && m.parent_symbol is Struct) {
ccall.add_argument (new CCodeIdentifier ("self"));
- } else if (m != null && m.get_type_parameters ().size > 0 && !get_ccode_has_generic_type_parameter (m) && !get_ccode_simple_generics (m)) {
+ } else if (m != null && m.get_type_parameters ().size > 0 && !get_ccode_has_generic_type_parameter (m) && !get_ccode_simple_generics (m) && (ccall != finish_call || expr.is_yield_expression)) {
// generic method
+ // don't add generic arguments for .end() calls
add_generic_type_arguments (in_arg_map, ma.get_type_arguments (), expr);
}
asynchronous/bug653861.vala \
asynchronous/bug654336.vala \
asynchronous/bug654337.vala \
+ asynchronous/bug661961.vala \
asynchronous/closures.vala \
dbus/basic-types.test \
dbus/arrays.test \
--- /dev/null
+public async T foo<T> (T bar) {
+ return bar;
+}
+
+void main () {
+ MainLoop loop = new MainLoop ();
+ foo.begin ("test", (s,r) => {
+ assert (foo.end<string> (r) == "test");
+ loop.quit ();
+ });
+ loop.run ();
+}