2008-02-23 Juerg Billeter <j@bitron.ch>
* vala/valamethodtype.vala: check whether delegate matches method,
fixes bug 515617
svn path=/trunk/; revision=1033
2008-02-23 Jürg Billeter <j@bitron.ch>
+ * vala/valamethodtype.vala: check whether delegate matches method,
+ fixes bug 515617
+
+2008-02-23 Jürg Billeter <j@bitron.ch>
+
* gen-project/valaprojectgenerator.vala: fix Date.set_time_val call
2008-02-22 Jürg Billeter <j@bitron.ch>
public override DataType! copy () {
return new MethodType (method_symbol);
}
+
+ public override bool compatible (DataType! target_type, bool enable_non_null = true) {
+ var dt = target_type as DelegateType;
+ if (dt == null) {
+ // method types incompatible to anything but delegates
+ return false;
+ }
+
+ return dt.delegate_symbol.matches_method (method_symbol);
+ }
+
+ public override string! to_string () {
+ return method_symbol.get_full_name ();
+ }
}