[vala/staging] codegen: Don't add generics arguments/parameters to async finish method



commit 4eb297a12758197cf9161fb684b37c7269d197a9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Mar 9 15:52:30 2021 +0100

    codegen: Don't add generics arguments/parameters to async finish method

 codegen/valaccodemethodmodule.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index d04f54a88..fc99a58aa 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -977,7 +977,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
 
                // memory management for generic types
                List<TypeParameter>? type_parameters = null;
-               if (is_gtypeinstance_creation_method (m)) {
+               if (is_gtypeinstance_creation_method (m) && (direction & 1) == 1) {
                        type_parameters = ((Class) m.parent_symbol).get_type_parameters ();
                } else if (!m.closure && (direction & 1) == 1) {
                        type_parameters = m.get_type_parameters ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]