Skip to content

Commit

Permalink
Fix an infinite loop in pretty-printing
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 397232971
  • Loading branch information
cushon authored and Javac Team committed Sep 17, 2021
1 parent 0f596d8 commit 9c70fad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion java/com/google/turbine/tree/Pretty.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Pretty append(String s) {

@Override
public @Nullable Void visitClassLiteral(ClassLiteral classLiteral, @Nullable Void input) {
classLiteral.accept(this, input);
classLiteral.type().accept(this, input);
append(".class");
return null;
}
Expand Down
3 changes: 3 additions & 0 deletions javatests/com/google/turbine/parse/ExpressionParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ public static Iterable<Object[]> parameters() {
{
"A ? B : C ? D : E;", "(A ? B : (C ? D : E))",
},
{
"Foo.class", "Foo.class",
},
});
}

Expand Down

0 comments on commit 9c70fad

Please sign in to comment.