[vala] dova: Support calling hash on generic type parameters



commit f325fbe414d364a8d3a8fdbfc315d0ee4d948743
Author: Jürg Billeter <j bitron ch>
Date:   Sat Jun 5 09:49:55 2010 +0200

    dova: Support calling hash on generic type parameters

 vala/valagenerictype.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagenerictype.vala b/vala/valagenerictype.vala
index f908d06..18035e4 100644
--- a/vala/valagenerictype.vala
+++ b/vala/valagenerictype.vala
@@ -61,4 +61,13 @@ public class Vala.GenericType : DataType {
 	public override string to_qualified_string (Scope? scope = null) {
 		return type_parameter.name;
 	}
+
+	public override Symbol? get_member (string member_name) {
+		if (CodeContext.get ().profile == Profile.DOVA) {
+			if (member_name == "hash") {
+				return CodeContext.get ().root.scope.lookup ("Dova").scope.lookup ("Object").scope.lookup ("hash");
+			}
+		}
+		return null;
+	}
 }



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