From 7577ffb269cd31da8815b7eadd72867965a2c742 Mon Sep 17 00:00:00 2001 From: Princeton Ferro Date: Fri, 25 Nov 2022 02:09:55 -0500 Subject: [PATCH] minor fixes to implementmissingprereqs code action Inherit the access modifier on properties' get/set accessors. --- src/codeaction/implementmissingprereqsaction.vala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/codeaction/implementmissingprereqsaction.vala b/src/codeaction/implementmissingprereqsaction.vala index d421d8af..55c0cc09 100644 --- a/src/codeaction/implementmissingprereqsaction.vala +++ b/src/codeaction/implementmissingprereqsaction.vala @@ -145,11 +145,15 @@ class Vls.ImplementMissingPrereqsAction : CodeAction { if (prop.get_accessor != null) { if (prop.get_accessor.value_type is Vala.ReferenceType && prop.get_accessor.value_type.value_owned) symbols_insert_text.append (" owned"); + if (prop.get_accessor.access != prop.access) + symbols_insert_text.append_printf (" %s", prop.get_accessor.access.to_string ()); symbols_insert_text.append (" get;"); } if (prop.set_accessor != null) { if (prop.set_accessor.value_type is Vala.ReferenceType && prop.set_accessor.value_type.value_owned) symbols_insert_text.append (" owned"); + if (prop.set_accessor.access != prop.access) + symbols_insert_text.append_printf (" %s", prop.set_accessor.access.to_string ()); symbols_insert_text.append (" set;"); } symbols_insert_text.append (" }");