[vala] Do not warn when calling .begin or .end on static async method



commit e774df65e1bc22945a6e592fefcc7641b9a3ba34
Author: JÃrg Billeter <j bitron ch>
Date:   Mon Aug 6 16:46:09 2012 +0200

    Do not warn when calling .begin or .end on static async method

 vala/valamemberaccess.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 8a8f06a..059a136 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -787,7 +787,11 @@ public class Vala.MemberAccess : Expression {
 			}
 
 			if (!instance && !klass && !(symbol_reference is CreationMethod) && may_access_instance_members && inner != null) {
-				Report.warning (source_reference, "Access to static member `%s' with an instance reference".printf (symbol_reference.get_full_name ()));
+				if (inner.symbol_reference is Method) {
+					// do not warn when calling .begin or .end on static async method
+				} else {
+					Report.warning (source_reference, "Access to static member `%s' with an instance reference".printf (symbol_reference.get_full_name ()));
+				}
 			}
 
 			if (context.experimental_non_null && instance && inner.value_type.nullable &&



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