From: Jürg Billeter Date: Sat, 9 Oct 2010 18:56:35 +0000 (+0200) Subject: Report error when trying to use async method as delegate X-Git-Tag: 0.11.1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cf3c9e97e31654ef56f034d223bc4faa1f9c97e;p=thirdparty%2Fvala.git Report error when trying to use async method as delegate --- diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index 27c660ccc..af37190c2 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -157,6 +157,11 @@ public class Vala.Delegate : TypeSymbol { * @return true if the specified method is compatible to this callback */ public bool matches_method (Method m, DataType dt) { + if (m.coroutine) { + // async delegates are not yet supported + return false; + } + // method is allowed to ensure stricter return type (stronger postcondition) if (!m.return_type.stricter (return_type.get_actual_type (dt, null, this))) { return false;