From bb6227dc17f03831c605742db95f686346c1f62f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 25 Feb 2023 13:08:33 +0100 Subject: [PATCH] vala: Fix spaces for attributes when writing property accessors --- vala/valacodewriter.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 (); -- 2.47.2