]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Don't add generics arguments/parameters to async finish method
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 9 Mar 2021 14:52:30 +0000 (15:52 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 9 Mar 2021 14:52:30 +0000 (15:52 +0100)
codegen/valaccodemethodmodule.vala

index d04f54a88181c3a397bba8f8a13bfff61aaaaf9c..fc99a58aaa0dc87a25118a56177aeb4fd7478ac3 100644 (file)
@@ -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 ();