]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not chain up creation methods when using construct block
authorJürg Billeter <j@bitron.ch>
Thu, 3 Sep 2009 09:18:36 +0000 (11:18 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 3 Sep 2009 09:22:42 +0000 (11:22 +0200)
vala/valacreationmethod.vala

index 06f66109d8aab5a400590ac9de35944b51161cc8..35dedf27e5f41a5dbe005ca14ca837f039ed8af4 100644 (file)
@@ -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");