[vala] GAsync: Report error on missing gio-2.0 package



commit 8be4aec5283b5bed483d8509a681e74131b92f24
Author: Jürg Billeter <j bitron ch>
Date:   Wed Sep 16 15:13:48 2009 +0200

    GAsync: Report error on missing gio-2.0 package

 vala/valamethod.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index b0ecc39..8d8d184 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]