]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not warn when calling .begin or .end on static async method
authorJürg Billeter <j@bitron.ch>
Mon, 6 Aug 2012 14:46:09 +0000 (16:46 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 6 Aug 2012 14:54:49 +0000 (16:54 +0200)
vala/valamemberaccess.vala

index 8a8f06a705812ad3d13966ace93916e532a58789..059a136b680b051d9290a943374cd4d70039b76a 100644 (file)
@@ -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 &&