2008-08-27 Jared Moore <jaredm@gmx.com>
* vala/valasemanticanalyser.vala:
Check type of 'default' initializers in semantic analyzer, fixes bug
544556.
svn path=/trunk/; revision=1791
+2008-08-27 Jared Moore <jaredm@gmx.com>
+
+ * vala/valasemanticanalyser.vala:
+
+ Check type of 'default' initializers in semantic analyzer, fixes bug
+ 544556.
+
2008-09-26 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vapi:
Report.error (prop.source_reference, "%s: construct properties must be public".printf (prop.get_full_name ()));
}
}
+
+ if (prop.default_expression != null && !(prop.default_expression.value_type.compatible (prop.property_type))) {
+ prop.error = true;
+ Report.error (prop.default_expression.source_reference, "Expected initializer of type `%s' but got `%s'".printf (prop.property_type.to_string (), prop.default_expression.value_type.to_string ()));
+ }
}
public override void visit_property_accessor (PropertyAccessor acc) {