]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Support calling hash on generic type parameters
authorJürg Billeter <j@bitron.ch>
Sat, 5 Jun 2010 07:49:55 +0000 (09:49 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 5 Jun 2010 08:12:10 +0000 (10:12 +0200)
vala/valagenerictype.vala

index f908d0686f95a12eb57cb8db01a8e625dc812015..18035e4a6f28e029c359b95af9a997cc7a8318aa 100644 (file)
@@ -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;
+       }
 }