]> 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>
Tue, 20 Jun 2023 08:59:33 +0000 (10:59 +0200)
vala/valacodewriter.vala

index d5fcc8035a8bf5407e2d16d6a1ece6ae9f5e4af6..c016497b5d2f6c78ba189db26a7f913ec39fc671 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 ();