Skip to content

Commit

Permalink
Pair programming
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Jun 12, 2024
1 parent e6ffb44 commit 21878aa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ private ImmutableList<TypeMember> getAllTypeMembers(
new AutoValue_TypeMemberOrder_TypeMember(
member, treeStartPos, state.getEndPosition(member), e)));

/* XXX: Write explanation about this enum. */
currentStartPos = Math.max(currentStartPos, state.getEndPosition(member));
}
return builder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ void replacement() {
.addInputLines(
"A.java",
"class A {",
" class Inner {}",
" class Inner {",
" int innerFoo() {",
" return 1;",
" }",
"",
" private final int innerBar = 2;",
" }",
"",
" int foo() {",
" return foo;",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ void replacement() {
.addInputLines(
"A.java",
"enum A {",
" FOO;",
" FOO,",
" BAR;",
"",
" class InnerClass {}",
"",
Expand All @@ -112,13 +113,14 @@ void replacement() {
" }",
"",
" final int baz = 2;",
" static final int BAR = 1;",
" static final int BAZ = 1;",
"}")
.addOutputLines(
"A.java",
"enum A {",
" FOO;",
" static final int BAR = 1;",
" FOO,",
" BAR;",
" static final int BAZ = 1;",
"",
" final int baz = 2;",
"",
Expand Down

0 comments on commit 21878aa

Please sign in to comment.