-
-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
Prettier-Java 2.7.6
--print-width 80Input:
public abstract class Foo implements MyInterface {
private Object foo() {
return switch (value) {
case Map<?, ?> map -> {
yield x instanceof A a
? true
: (a != null
? a
: a
.bbbbbbbbbbbbb()
.ccccccccccccc()
.ddddddddddddd());
}
};
}
}Output:
public abstract class Foo implements MyInterface {
private Object foo() {
return switch (value) {
case Map<?, ?> map -> {
yield x instanceof A a
? true
: (a != null
? a
: a
.bbbbbbbbbbbbb()
.ccccccccccccc()
.ddddddddddddd());
}
};
}
}Expected behavior:
public abstract class Foo implements MyInterface {
private Object foo() {
return switch (value) {
case Map<?, ?> map -> {
yield x instanceof A a
? true
: (a != null
? a
: a
.bbbbbbbbbbbbb()
.ccccccccccccc()
.ddddddddddddd());
}
};
}
}I'm not really certain how many tabs should be used for the indentation (due to the other issue I opened) but I don't think 3 is the right number.
In version 2.7.5 it was indented with 2 which again I think is wrong.
cc @jtkiesel
Metadata
Metadata
Assignees
Labels
No labels