]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GAsync: Report error on missing gio-2.0 package
authorJürg Billeter <j@bitron.ch>
Wed, 16 Sep 2009 13:13:48 +0000 (15:13 +0200)
committerJürg Billeter <j@bitron.ch>
Wed, 16 Sep 2009 13:13:48 +0000 (15:13 +0200)
vala/valamethod.vala

index b0ecc39a3efb0d6265f3cfbbd268357c96a36d5f..8d8d184476a40328ce57136340c3b5ffa143c8be 100644 (file)
@@ -761,6 +761,12 @@ public class Vala.Method : Member {
                        Report.error (source_reference, "Non-abstract, non-extern methods must have bodies");
                }
 
+               if (coroutine && !analyzer.context.has_package ("gio-2.0")) {
+                       error = true;
+                       Report.error (source_reference, "gio-2.0 package required for async methods");
+                       return false;
+               }
+
                var old_source_file = analyzer.current_source_file;
                var old_symbol = analyzer.current_symbol;