[vala] Do not chain up creation methods when using construct block
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Do not chain up creation methods when using construct block
- Date: Thu, 3 Sep 2009 09:29:40 +0000 (UTC)
commit 2f5d77b8b07f4f3964cab5ac698c8dd7df942756
Author: Jürg Billeter <j bitron ch>
Date: Thu Sep 3 11:18:36 2009 +0200
Do not chain up creation methods when using construct block
vala/valacreationmethod.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala
index 06f6610..35dedf2 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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]