[vala] Accept single ellipsis parameter for instance methods



commit fbf6b363cf73dbcd985d3d805a61366b270b384b
Author: Richard Wiedenhöft <richard wiedenhoeft gmail com>
Date:   Fri Mar 14 14:52:39 2014 +0100

    Accept single ellipsis parameter for instance methods
    
    Fixes bug 726347

 vala/valamethod.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 7070cd1..3e9096a 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -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 
`...'");
                }


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