From: Jürg Billeter Date: Mon, 6 Aug 2012 14:46:09 +0000 (+0200) Subject: Do not warn when calling .begin or .end on static async method X-Git-Tag: 0.17.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e774df65e1bc22945a6e592fefcc7641b9a3ba34;p=thirdparty%2Fvala.git Do not warn when calling .begin or .end on static async method --- diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala index 8a8f06a70..059a136b6 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 &&