]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Add prototype for *_new() of abstact compact classes
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 5 Nov 2018 07:28:08 +0000 (08:28 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 5 Nov 2018 07:48:07 +0000 (08:48 +0100)
Found with -Werror=missing-prototypes

codegen/valaccodemethodmodule.vala

index b536e749f9e9c74858db564bfb7f8e7a4298636b..2d8bf9e3bc7b8a5894dc9cd38954076abc032fbf 100644 (file)
@@ -197,7 +197,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                var cl = m.parent_symbol as Class;
 
                // do not generate _new functions for creation methods of abstract classes
-               if (!(m is CreationMethod && cl != null && cl.is_abstract)) {
+               if (!(m is CreationMethod && cl != null && cl.is_abstract && !cl.is_compact)) {
                        bool etv_tmp = ellipses_to_valist;
                        ellipses_to_valist = false;
                        generate_cparameters (m, decl_space, cparam_map, function, null, carg_map, new CCodeFunctionCall (new CCodeIdentifier ("fake")));