]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Accept single ellipsis parameter for instance methods
authorRichard Wiedenhöft <richard.wiedenhoeft@gmail.com>
Fri, 14 Mar 2014 13:52:39 +0000 (14:52 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 16 Mar 2014 10:31:46 +0000 (11:31 +0100)
Fixes bug 726347

vala/valamethod.vala

index 7070cd154a5fb7c2171721319ffc7aac5dee7797..3e9096a7df5e0f55346d5c554287af2c8ae20b67 100644 (file)
@@ -648,8 +648,8 @@ public class Vala.Method : Subroutine {
                        return_type.check (context);
                }
 
-               if (parameters.size == 1 && parameters[0].ellipsis && body != null) {
-                       // accept just `...' for external methods for convenience
+               if (parameters.size == 1 && parameters[0].ellipsis && body != null && binding != MemberBinding.INSTANCE) {
+                       // accept just `...' for external methods and instance methods
                        error = true;
                        Report.error (parameters[0].source_reference, "Named parameter required before `...'");
                }