Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2669,18 +2669,29 @@ private void visitToDeclare(
Optional<String> trailing,
Optional<BreakTag> annotationBreakForRecords) {
sync(node);
Optional<TypeWithDims> typeWithDims;
Tree type;
if (node.getType() != null) {
TypeWithDims extractedDims = DimensionHelpers.extractDims(node.getType(), SortedDims.YES);
typeWithDims = Optional.of(extractedDims);
type = extractedDims.node;
} else {
// "var" and an untyped lambda parameter have no type tree
typeWithDims = Optional.empty();
type = null;
}
declareOne(
kind,
annotationsDirection,
Optional.of(node.getModifiers()),
node.getType(),
type,
node.getName(),
"",
equals,
initializer,
trailing,
/* receiverExpression= */ Optional.empty(),
/* typeWithDims= */ Optional.empty(),
typeWithDims,
annotationBreakForRecords);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@interface MyTypeAnno {}

public class GjfFailure {
void m(int a @MyTypeAnno []) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@interface MyTypeAnno {}

public class GjfFailure {
void m(int a @MyTypeAnno []) {}
}
Loading