]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error when trying to use async method as delegate
authorJürg Billeter <j@bitron.ch>
Sat, 9 Oct 2010 18:56:35 +0000 (20:56 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 9 Oct 2010 18:59:50 +0000 (20:59 +0200)
vala/valadelegate.vala

index 27c660ccceb07b10ddbb3f2d9a774f29a1030158..af37190c26d90df3601ea18f5252cb5c39bca5ba 100644 (file)
@@ -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;