Skip to content

Commit

Permalink
minor fixes to implementmissingprereqs code action
Browse files Browse the repository at this point in the history
Inherit the access modifier on properties' get/set accessors.
  • Loading branch information
Prince781 committed Nov 25, 2022
1 parent 7e6b401 commit 7577ffb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/codeaction/implementmissingprereqsaction.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 (" }");
Expand Down

0 comments on commit 7577ffb

Please sign in to comment.