From: Jürg Billeter Date: Thu, 11 Nov 2010 13:52:57 +0000 (+0100) Subject: Report error for signal handlers throwing errors X-Git-Tag: 0.11.3~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f1b643a14b2068abb9eebc965cf17407bca3b1e;p=thirdparty%2Fvala.git Report error for signal handlers throwing errors --- diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index 00d9b39be..b56744bc7 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -208,7 +208,22 @@ public class Vala.Delegate : TypeSymbol { if (method_params_it.next ()) { return false; } - + + // method may throw less but not more errors than the delegate + foreach (DataType method_error_type in m.get_error_types ()) { + bool match = false; + foreach (DataType delegate_error_type in get_error_types ()) { + if (method_error_type.compatible (delegate_error_type)) { + match = true; + break; + } + } + + if (!match) { + return false; + } + } + return true; }