From: Jürg Billeter Date: Thu, 3 Sep 2009 09:18:36 +0000 (+0200) Subject: Do not chain up creation methods when using construct block X-Git-Tag: 0.7.6~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f5d77b8b07f4f3964cab5ac698c8dd7df942756;p=thirdparty%2Fvala.git Do not chain up creation methods when using construct block --- diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index 06f66109d..35dedf27e 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -178,8 +178,8 @@ public class Vala.CreationMethod : Method { // no chain up necessary for direct GObject subclasses } else if (analyzer.context.profile == Profile.GOBJECT && cl.is_subtype_of (analyzer.object_type) - && n_construction_params > 0) { - // no chain up when using GObject construct properties + && (n_construction_params > 0 || cl.constructor != null)) { + // no chain up when using GObject construct properties or constructor } else if (cl.base_class.default_construction_method == null || cl.base_class.default_construction_method.access == SymbolAccessibility.PRIVATE) { Report.warning (source_reference, "unable to chain up to private base constructor");