]> 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:28:08 +0000 (08:28 +0100)
Found with -Werror=missing-prototypes

codegen/valaccodemethodmodule.vala

index 5aba1446ee3157c7cfc7ecf24f93447b7ad291c5..999f119010b1f7001a4b474a0c4c8711147a0773 100644 (file)
@@ -198,7 +198,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")));