From: Jürg Billeter Date: Fri, 24 Aug 2012 15:08:53 +0000 (+0200) Subject: Accept non-automatic properties with default value X-Git-Tag: 0.17.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=049a77952370fcad5f6fbdab08dd84d89f40151a;p=thirdparty%2Fvala.git Accept non-automatic properties with default value The default value is passed to the GParamSpec. The property will not implicitly be set to the default value during object construction unless it is a construct property. --- diff --git a/vala/valaparser.vala b/vala/valaparser.vala index ca0022a17..c2e62807c 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -2765,8 +2765,6 @@ public class Vala.Parser : CodeVisitor { prop.field = new Field ("_%s".printf (prop.name), variable_type, prop.initializer, prop.source_reference); prop.field.access = SymbolAccessibility.PRIVATE; prop.field.binding = prop.binding; - } else if (prop.initializer != null) { - Report.error (prop.initializer.source_reference, "only automatic properties can have default values"); } }