vala r1157 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1157 - in trunk: . vala
- Date: Sun, 23 Mar 2008 19:34:45 +0000 (GMT)
Author: juergbi
Date: Sun Mar 23 19:34:45 2008
New Revision: 1157
URL: http://svn.gnome.org/viewvc/vala?rev=1157&view=rev
Log:
2008-03-23 Juerg Billeter <j bitron ch>
* vala/valastruct.vala: inherit default value from base type
Modified:
trunk/ChangeLog
trunk/vala/valastruct.vala
Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala (original)
+++ trunk/vala/valastruct.vala Sun Mar 23 19:34:45 2008
@@ -378,7 +378,18 @@
}
public override string get_default_value () {
- return default_value;
+ if (default_value != null) {
+ return default_value;
+ }
+
+ // inherit default value from base type
+ foreach (DataType type in base_types) {
+ var st = type.data_type as Struct;
+ if (st != null) {
+ return st.get_default_value ();
+ }
+ }
+ return null;
}
private void set_default_value (string! value) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]