Commit 211dc197 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

ensure that the error domains match when comparing two methods for

2007-08-28  Juerg Billeter  <j@bitron.ch>

	* vala/valamethod.vala: ensure that the error domains match when
	  comparing two methods for equality, fixes bug 465123

svn path=/trunk/; revision=523
parent e5bccaaa
2007-08-28 Jürg Billeter <j@bitron.ch>
* vala/valamethod.vala: ensure that the error domains match when
comparing two methods for equality, fixes bug 465123
2007-08-28 Jürg Billeter <j@bitron.ch>
* ccode/valaccodeswitchstatement.vala,
......
......@@ -355,7 +355,19 @@ public class Vala.Method : Member, Invokable {
if (method_params_it.next ()) {
return false;
}
Iterator<TypeReference> method_error_domains_it = m2.get_error_domains ().iterator ();
foreach (TypeReference error_domain in error_domains) {
/* method may not have less error domains */
if (!method_error_domains_it.next ()) {
return false;
}
if (!method_error_domains_it.get ().equals (error_domain)) {
return false;
}
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment