-
-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Prettier-Java 2.7.4
--print-width 55Input:
public abstract class Foo implements MyInterface {
@Override public String foo() {
return (
true && false && true && false && true
);
}
}Output:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return (
true && false && true && false && true
);
}
}Expected behavior:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return true && false && true && false && true;
}
}Note that making print-width 56 leads to a different (and still wrong result):
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return (true && false && true && false && true);
}
}In this case, it correctly puts the whole thing on a single line but it doesn't remove the parentheses.
Metadata
Metadata
Assignees
Labels
No labels