From: Rico Tzschichholz Date: Tue, 3 Sep 2019 07:32:54 +0000 (+0200) Subject: genie: Creation methods should not be static X-Git-Tag: 0.46.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a173c6e2cd1372063a6184635f8dbc6f8bf4c46c;p=thirdparty%2Fvala.git genie: Creation methods should not be static Revealed by ba8122d3a64e44eac44c5254c93fb181df601b0a --- diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala index 105f64332..4727dfec8 100644 --- a/codegen/valaccodemethodmodule.vala +++ b/codegen/valaccodemethodmodule.vala @@ -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); diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala index 2348d4346..9c7d72dd6 100644 --- a/vala/valagenieparser.vala +++ b/vala/valagenieparser.vala @@ -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 ();