File tree 3 files changed +22
-2
lines changed
main/java/com/google/googlejavaformat/java
test/resources/com/google/googlejavaformat/java/testdata
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -2542,18 +2542,20 @@ private void visitToDeclare(
2542
2542
String equals ,
2543
2543
Optional <String > trailing ) {
2544
2544
sync (node );
2545
+ TypeWithDims extractedDims = DimensionHelpers .extractDims (node .getType (), SortedDims .YES );
2546
+ Optional <TypeWithDims > typeWithDims = Optional .of (extractedDims );
2545
2547
declareOne (
2546
2548
kind ,
2547
2549
annotationsDirection ,
2548
2550
Optional .of (node .getModifiers ()),
2549
- node . getType () ,
2551
+ extractedDims . node ,
2550
2552
node .getName (),
2551
2553
"" ,
2552
2554
equals ,
2553
2555
initializer ,
2554
2556
trailing ,
2555
2557
/* receiverExpression= */ Optional .empty (),
2556
- /* typeWithDims= */ Optional . empty () );
2558
+ typeWithDims );
2557
2559
}
2558
2560
2559
2561
/** Does not omit the leading '<', which should be associated with the type name. */
Original file line number Diff line number Diff line change
1
+ import java.lang.annotation.ElementType;
2
+ import java.lang.annotation.Target;
3
+
4
+ @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
5
+ @interface MyTypeAnno {}
6
+
7
+ public class GjfFailure {
8
+ void m(int a @MyTypeAnno []) {}
9
+ }
Original file line number Diff line number Diff line change
1
+ import java.lang.annotation.ElementType;
2
+ import java.lang.annotation.Target;
3
+
4
+ @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
5
+ @interface MyTypeAnno {}
6
+
7
+ public class GjfFailure {
8
+ void m(int a @MyTypeAnno []) {}
9
+ }
You can’t perform that action at this time.
0 commit comments