File tree Expand file tree Collapse file tree
main/java/com/google/googlejavaformat/java
test/resources/com/google/googlejavaformat/java/testdata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2542,18 +2542,20 @@ private void visitToDeclare(
25422542 String equals ,
25432543 Optional <String > trailing ) {
25442544 sync (node );
2545+ TypeWithDims extractedDims = DimensionHelpers .extractDims (node .getType (), SortedDims .YES );
2546+ Optional <TypeWithDims > typeWithDims = Optional .of (extractedDims );
25452547 declareOne (
25462548 kind ,
25472549 annotationsDirection ,
25482550 Optional .of (node .getModifiers ()),
2549- node . getType () ,
2551+ extractedDims . node ,
25502552 node .getName (),
25512553 "" ,
25522554 equals ,
25532555 initializer ,
25542556 trailing ,
25552557 /* receiverExpression= */ Optional .empty (),
2556- /* typeWithDims= */ Optional . empty () );
2558+ typeWithDims );
25572559 }
25582560
25592561 /** 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