From: Rico Tzschichholz Date: Sat, 25 Feb 2023 12:08:33 +0000 (+0100) Subject: vala: Fix spaces for attributes when writing property accessors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb6227dc17f03831c605742db95f686346c1f62f;p=thirdparty%2Fvala.git vala: Fix spaces for attributes when writing property accessors --- diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala index d5fcc8035..c016497b5 100644 --- a/vala/valacodewriter.vala +++ b/vala/valacodewriter.vala @@ -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 ();