]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Fix spaces for attributes when writing property accessors
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 25 Feb 2023 12:08:33 +0000 (13:08 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Jun 2023 11:26:50 +0000 (13:26 +0200)
vala/valacodewriter.vala

index f9f1fccd1f175a00dcb328c480075061c8e50b33..fa6b299c5cf7064826c2f684815b097dd27d904c 100644 (file)
@@ -1693,7 +1693,11 @@ public class Vala.CodeWriter : CodeVisitor {
                                }
                        }
 
-                       if (!(node is Parameter) && !(node is PropertyAccessor)) {
+                       if (node is PropertyAccessor) {
+                               write_string (" ");
+                       } else if (node is Parameter) {
+                               // nothing
+                       } else {
                                write_indent ();
                        }
 
@@ -1717,7 +1721,9 @@ public class Vala.CodeWriter : CodeVisitor {
                                stream.puts (")");
                        }
                        stream.puts ("]");
-                       if (node is Parameter || node is PropertyAccessor) {
+                       if (node is PropertyAccessor) {
+                               // nothing
+                       } else if (node is Parameter) {
                                write_string (" ");
                        } else {
                                write_newline ();