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 @@ -223,7 +223,7 @@ public Void visitCase(CaseTree node, Void unused) {
token(">");
builder.space();
scan(node.getBody(), null);
token(";");
builder.guessToken(";");
break;
default:
throw new AssertionError(node.getCaseKind());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
@RunWith(Parameterized.class)
public class FormatterIntegrationTest {

private static final ImmutableSet<String> JAVA14_TESTS = ImmutableSet.of("java14");
private static final ImmutableSet<String> JAVA14_TESTS = ImmutableSet.of("java14", "I477");

@Parameters(name = "{index}: {0}")
public static Iterable<Object[]> data() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class I477 {
public static String foo(int in) {
return switch (in) {
case 1 -> "A";
case 2 -> "B";
default -> throw new IllegalStateException("Unknown input " + in);
};
}

public static String foo(int in) {
return switch (in) {
case 1 -> "A";
case 2 -> "B";
default -> "C";
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class I477 {
public static String foo(int in) {
return switch (in) {
case 1 -> "A";
case 2 -> "B";
default -> throw new IllegalStateException("Unknown input " + in);
};
}

public static String foo(int in) {
return switch (in) {
case 1 -> "A";
case 2 -> "B";
default -> "C";
};
}
}