[vala/wip/issue/658: 35/48] Fixed code witer for anonymous delegates




commit 324d918d73f4803b036fa036938ba8de36eeb0f6
Author: Nick Schrader <nick schrader mailbox org>
Date:   Tue Oct 20 20:11:00 2020 -0300

    Fixed code witer for anonymous delegates

 vala/valacodewriter.vala | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index 585cc1d42..04bd5929a 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -717,7 +717,6 @@ public class Vala.CodeWriter : CodeVisitor {
                        return;
                }
                        
-
                if (context.vapi_comments && cb.comment != null) {
                        write_comment (cb.comment);
                }
@@ -1612,17 +1611,12 @@ public class Vala.CodeWriter : CodeVisitor {
                        // TODO: Parameter attributes?
                        write_attributes (param);
 
-                       if (param.params_array) {
-                               write_string ("params ");
-                       }
-
                        if (param.direction == ParameterDirection.REF) {
                                write_string ("ref ");
                        } else if (param.direction == ParameterDirection.OUT) {
                                write_string ("out ");
                        }
 
-                       // TODO: Array type?
                        write_type (param.variable_type);
                        write_type_suffix (param.variable_type);
 
@@ -1637,7 +1631,7 @@ public class Vala.CodeWriter : CodeVisitor {
                // TODO: What about attributes?
                //write_attributes (cb);
 
-               write_string ("delegate(");
+               write_string ("delegate");
                write_anonymous_params (cb.get_parameters ());
 
                write_string (" => ");


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