vala r1337 - in trunk: . vala



Author: juergbi
Date: Fri May  2 21:03:36 2008
New Revision: 1337
URL: http://svn.gnome.org/viewvc/vala?rev=1337&view=rev

Log:
2008-05-02  Juerg Billeter  <j bitron ch>

	* vala/valastruct.vala: inherit integer_type and floating_type,
	fixes bug 530600


Modified:
   trunk/ChangeLog
   trunk/vala/valastruct.vala

Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala	(original)
+++ trunk/vala/valastruct.vala	Fri May  2 21:03:36 2008
@@ -234,6 +234,12 @@
 	 * @return true if this is an integer type, false otherwise
 	 */
 	public bool is_integer_type () {
+		foreach (DataType type in base_types) {
+			var st = type.data_type as Struct;
+			if (st != null && st.is_integer_type ()) {
+				return true;
+			}
+		}
 		return integer_type;
 	}
 	
@@ -243,6 +249,12 @@
 	 * @return true if this is a floating point type, false otherwise
 	 */
 	public bool is_floating_type () {
+		foreach (DataType type in base_types) {
+			var st = type.data_type as Struct;
+			if (st != null && st.is_floating_type ()) {
+				return true;
+			}
+		}
 		return floating_type;
 	}
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]