]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
genie: Creation methods should not be static
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 3 Sep 2019 07:32:54 +0000 (09:32 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 3 Sep 2019 07:43:01 +0000 (09:43 +0200)
Revealed by ba8122d3a64e44eac44c5254c93fb181df601b0a

codegen/valaccodemethodmodule.vala
vala/valagenieparser.vala

index 105f643328749179bc43731b5462429689273f54..4727dfec853e61d7cb7627ba9c64819502ecd5ef 100644 (file)
@@ -937,8 +937,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                        if (!cl.is_compact && vcall == null && (direction & 1) == 1) {
                                cparam_map.set (get_param_pos (get_ccode_instance_pos (m)), new CCodeParameter ("object_type", "GType"));
                        }
-               } else if ((m.binding == MemberBinding.INSTANCE || (m.parent_symbol is Struct && m is CreationMethod))
-                   && (direction != 2 || get_ccode_finish_instance (m))) {
+               } else if (m.binding == MemberBinding.INSTANCE && (direction != 2 || get_ccode_finish_instance (m))) {
                        var this_type = SemanticAnalyzer.get_this_type (m);
 
                        generate_type_declaration (this_type, decl_space);
index 2348d434619a80d05800fedf17f03758ee6d5dcd..9c7d72dd6e1c713125351503128f9ccec40f2120 100644 (file)
@@ -3699,7 +3699,6 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                method.access = SymbolAccessibility.PUBLIC;
                set_attributes (method, attrs);
-               method.binding = MemberBinding.STATIC;
 
                if (accept_block ()) {
                        method.body = parse_block ();