vala r1945 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1945 - in trunk: . vala
- Date: Fri, 31 Oct 2008 10:27:57 +0000 (UTC)
Author: juergbi
Date: Fri Oct 31 10:27:56 2008
New Revision: 1945
URL: http://svn.gnome.org/viewvc/vala?rev=1945&view=rev
Log:
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
Modified:
trunk/ChangeLog
trunk/vala/valaproperty.vala
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valaproperty.vala
==============================================================================
--- trunk/vala/valaproperty.vala (original)
+++ trunk/vala/valaproperty.vala Fri Oct 31 10:27:56 2008
@@ -41,12 +41,28 @@
/**
* 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.
@@ -164,6 +180,8 @@
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.
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Fri Oct 31 10:27:56 2008
@@ -614,7 +614,18 @@
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)) {
@@ -653,8 +664,6 @@
}
public override void visit_property_accessor (PropertyAccessor acc) {
- acc.prop = (Property) current_symbol;
-
if (acc.readable) {
current_return_type = acc.prop.property_type;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]