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 @@ -928,7 +928,8 @@ public boolean visitEnumDeclaration(ClassTree node) {

@Override
public Void visitMemberReference(MemberReferenceTree node, Void unused) {
sync(node);
// No sync(node): javac's start position for a member reference leaves out a type annotation on its
// qualifier ("@A ArrayList::new"), so syncing to it would report the annotation as never generated.
builder.open(OpenOp.builder()
.plusIndent(plusFour)
.debugName("methodReference")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class C {
@A(0x14)
int f(Object o) {
@A(0x40)
int local;
try (@A(0x41)
JarFile jarFile = new JarFile("hello.jar")) {
} catch (
@A(0x42)
IOException e) {
}
if (o instanceof @A(0x43) String) {}
new @A(0x44) ArrayList<>();
Supplier<List<?>> a = @A(0x45) ArrayList::new;
Supplier<List<?>> b = @A(0x46) ImmutableList::of;
String s = (@A(0x47) String) o;
List<?> xs = new ArrayList<@A(0x48) String>();
xs = ImmutableList.<@A(0x49) String>of();
Supplier<List<?>> c = ArrayList<@A(0x4A) String>::new;
Supplier<List<?>> d = ImmutableList::<@A(0x4B) String>of;
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class C {
@A(0x14)
int f(Object o) {
@A(0x40)
int local;
try (@A(0x41)
JarFile jarFile = new JarFile("hello.jar")) {
} catch (
@A(0x42)
IOException e) {
}
if (o instanceof @A(0x43) String) {}
new @A(0x44) ArrayList<>();
Supplier<List<?>> a = @A(0x45) ArrayList::new;
Supplier<List<?>> b = @A(0x46) ImmutableList::of;
String s = (@A(0x47) String) o;
List<?> xs = new ArrayList<@A(0x48) String>();
xs = ImmutableList.<@A(0x49) String>of();
Supplier<List<?>> c = ArrayList<@A(0x4A) String>::new;
Supplier<List<?>> d = ImmutableList::<@A(0x4B) String>of;
return 0;
}
}
Loading