]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Skip default-value positioning check for parameters of coroutines
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 18 Jan 2018 19:41:08 +0000 (20:41 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jan 2018 08:37:33 +0000 (09:37 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=644241

vala/valamethod.vala

index 5986f8786d7705b644dd95008854aaa109a087fb..93dd857938a4451a0a8f68c5584156aa7d72d2be 100644 (file)
@@ -730,6 +730,10 @@ public class Vala.Method : Subroutine {
                                error = true;
                                Report.error (param.source_reference, "Reference parameters are not supported for async methods");
                        }
+                       // TODO: begin and end parameters must be checked separately for coroutines
+                       if (coroutine) {
+                               continue;
+                       }
                        if (optional_param && param.initializer == null && !param.ellipsis) {
                                Report.warning (param.source_reference, "parameter without default follows parameter with default");
                        } else if (param.initializer != null) {