]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Actually create method cast for base interface method as needed
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 17:27:32 +0000 (18:27 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 17:30:43 +0000 (18:30 +0100)
Keep the fallback to base method for now.

This will silence some incompatible pointer type warnings.

codegen/valagtypemodule.vala

index 3ce231702b42a041003edfc72fa252357d627656..7c1f1cf035f086680e4796d0c7f5c4163f680085 100644 (file)
@@ -1483,10 +1483,11 @@ public class Vala.GTypeModule : GErrorModule {
                                        // method inherited from base class
 
                                        var base_method = cl_method;
-                                       if (cl_method.base_method != null) {
-                                               base_method = cl_method.base_method;
-                                       } else if (cl_method.base_interface_method != null) {
+                                       if (cl_method.base_interface_method != null) {
                                                base_method = cl_method.base_interface_method;
+                                       } else if (cl_method.base_method != null) {
+                                               //FIXME should this ever be possible here?
+                                               base_method = cl_method.base_method;
                                        }
 
                                        generate_method_declaration (base_method, cfile);