+2008-10-31 Jürg Billeter <j@bitron.ch>
+
+ * vala/valaproperty.vala:
+ * vala/valasemanticanalyzer.vala:
+
+ Set PropertyAccessor.prop property earlier, don't require the
+ semantic analyzer to set it
+
2008-10-31 Jürg Billeter <j@bitron.ch>
* vala/valacodenode.vala:
/**
* The get accessor of this property if available.
*/
- public PropertyAccessor? get_accessor { get; set; }
+ public PropertyAccessor? get_accessor {
+ get { return _get_accessor; }
+ set {
+ _get_accessor = value;
+ if (value != null) {
+ value.prop = this;
+ }
+ }
+ }
/**
* The set/construct accessor of this property if available.
*/
- public PropertyAccessor? set_accessor { get; set; }
+ public PropertyAccessor? set_accessor {
+ get { return _set_accessor; }
+ set {
+ _set_accessor = value;
+ if (value != null) {
+ value.prop = this;
+ }
+ }
+ }
/**
* Represents the generated ´this' parameter in this property.
private weak Property _base_property;
private Property _base_interface_property;
private bool base_properties_valid;
+ PropertyAccessor? _get_accessor;
+ PropertyAccessor? _set_accessor;
/**
* Creates a new property.
public override void visit_property (Property prop) {
current_symbol = prop;
- prop.accept_children (this);
+ prop.property_type.accept (this);
+
+ if (prop.get_accessor != null) {
+ prop.get_accessor.accept (this);
+ }
+ if (prop.set_accessor != null) {
+ prop.set_accessor.accept (this);
+ }
+
+ if (prop.default_expression != null) {
+ prop.default_expression.accept (this);
+ }
// check whether property type is at least as accessible as the property
if (!is_type_accessible (prop, prop.property_type)) {
}
public override void visit_property_accessor (PropertyAccessor acc) {
- acc.prop = (Property) current_symbol;
-
if (acc.readable) {
current_return_type = acc.prop.property_type;
} else {