@@ -912,7 +912,7 @@ public J visitParameter(KtParameter parameter, ExecutionContext data) {
912
912
}
913
913
914
914
if (parameter .getValOrVarKeyword () != null ) {
915
- modifiers .add (mapModifier (parameter .getValOrVarKeyword (), Collections . emptyList () , consumedSpaces ));
915
+ modifiers .add (mapModifier (parameter .getValOrVarKeyword (), lastAnnotations , consumedSpaces ));
916
916
}
917
917
}
918
918
@@ -1027,9 +1027,9 @@ public J visitPrimaryConstructor(KtPrimaryConstructor constructor, ExecutionCont
1027
1027
public J visitPropertyAccessor (KtPropertyAccessor accessor , ExecutionContext data ) {
1028
1028
Markers markers = Markers .EMPTY ;
1029
1029
List <J .Annotation > leadingAnnotations = new ArrayList <>();
1030
- List <J .Modifier > modifiers = mapModifiers (accessor .getModifierList (), leadingAnnotations , emptyList (), data );
1031
- TypeTree returnTypeExpression = null ;
1032
1030
List <J .Annotation > lastAnnotations = new ArrayList <>();
1031
+ List <J .Modifier > modifiers = mapModifiers (accessor .getModifierList (), leadingAnnotations , lastAnnotations , data );
1032
+ TypeTree returnTypeExpression = null ;
1033
1033
JContainer <Statement > params ;
1034
1034
J .Block body = null ;
1035
1035
Set <PsiElement > consumedSpaces = preConsumedInfix (accessor );
@@ -1164,7 +1164,7 @@ public J visitSecondaryConstructor(KtSecondaryConstructor constructor, Execution
1164
1164
List <J .Annotation > leadingAnnotations = new ArrayList <>();
1165
1165
List <J .Annotation > lastAnnotations = new ArrayList <>();
1166
1166
List <J .Modifier > modifiers = mapModifiers (constructor .getModifierList (), leadingAnnotations , lastAnnotations , data );
1167
- modifiers .add (mapModifier (constructor .getConstructorKeyword (), emptyList () , preConsumedInfix (constructor )));
1167
+ modifiers .add (mapModifier (constructor .getConstructorKeyword (), lastAnnotations , preConsumedInfix (constructor )));
1168
1168
1169
1169
JavaType .Method type = methodDeclarationType (constructor );
1170
1170
J .Identifier name = createIdentifier (requireNonNull (constructor .getName ()), prefix (constructor .getConstructorKeyword ()), type )
@@ -2609,7 +2609,7 @@ private J visitNamedFunction0(KtNamedFunction function, ExecutionContext data) {
2609
2609
modifiers .add (buildFinalModifier ().withPrefix (Space .EMPTY ));
2610
2610
}
2611
2611
2612
- modifiers .add (new J .Modifier (randomId (), prefix (function .getFunKeyword (), prefixConsumedSet ), Markers .EMPTY , "fun" , J .Modifier .Type .LanguageExtension , emptyList () ));
2612
+ modifiers .add (new J .Modifier (randomId (), prefix (function .getFunKeyword (), prefixConsumedSet ), Markers .EMPTY , "fun" , J .Modifier .Type .LanguageExtension , lastAnnotations ));
2613
2613
J .Identifier name ;
2614
2614
2615
2615
JavaType .Method type = methodDeclarationType (function );
0 commit comments