vala r1575 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1575 - in trunk: . vala
- Date: Fri, 13 Jun 2008 11:43:35 +0000 (UTC)
Author: juergbi
Date: Fri Jun 13 11:43:35 2008
New Revision: 1575
URL: http://svn.gnome.org/viewvc/vala?rev=1575&view=rev
Log:
2008-06-13 JÃrg Billeter <j bitron ch>
* vala/valastruct.vala:
Implement is_subtype_of method so that structs are considered
compatible to the specified base type
Modified:
trunk/ChangeLog
trunk/vala/valastruct.vala
Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala (original)
+++ trunk/vala/valastruct.vala Fri Jun 13 11:43:35 2008
@@ -532,4 +532,18 @@
}
}
}
+
+ public override bool is_subtype_of (TypeSymbol t) {
+ if (this == t) {
+ return true;
+ }
+
+ foreach (DataType base_type in base_types) {
+ if (base_type.data_type != null && base_type.data_type.is_subtype_of (t)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]