MemberComparator: enum entries have top priority and are never reordered
Fix rendering accordingly
This commit is contained in:
@@ -42,6 +42,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.isEnumEntry;
|
||||
import static org.jetbrains.jet.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden;
|
||||
|
||||
public class RecursiveDescriptorComparator {
|
||||
@@ -93,7 +94,8 @@ public class RecursiveDescriptorComparator {
|
||||
@NotNull Printer printer,
|
||||
boolean topLevel
|
||||
) {
|
||||
if ((descriptor instanceof ClassOrPackageFragmentDescriptor || descriptor instanceof PackageViewDescriptor) && !topLevel) {
|
||||
if (!isEnumEntry(descriptor) &&
|
||||
(descriptor instanceof ClassOrPackageFragmentDescriptor || descriptor instanceof PackageViewDescriptor) && !topLevel) {
|
||||
printer.println();
|
||||
}
|
||||
|
||||
@@ -154,6 +156,10 @@ public class RecursiveDescriptorComparator {
|
||||
else {
|
||||
printer.printlnWithNoIndent();
|
||||
}
|
||||
|
||||
if (isEnumEntry(descriptor)) {
|
||||
printer.println();
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user