Minor. Lower type aliase declarations priority

There are several reasons for doing this:
- See org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.computeDescriptors,
  classifiers are being deserialized in the last turn, so it's necessary to preserve consistent order
- Their priority should be close to classes
This commit is contained in:
Denis Zharkov
2016-08-15 12:28:42 +03:00
parent 5d65951938
commit 257417bc4a
51 changed files with 170 additions and 177 deletions
@@ -48,32 +48,32 @@ public class MemberComparator implements Comparator<DeclarationDescriptor> {
}
private static int getDeclarationPriority(DeclarationDescriptor descriptor) {
if (descriptor instanceof TypeAliasDescriptor) {
if (isEnumEntry(descriptor)) {
return 8;
}
else if (isEnumEntry(descriptor)) {
return 7;
}
else if (descriptor instanceof ConstructorDescriptor) {
return 6;
return 7;
}
else if (descriptor instanceof PropertyDescriptor) {
if (((PropertyDescriptor)descriptor).getExtensionReceiverParameter() == null) {
return 5;
return 6;
}
else {
return 4;
return 5;
}
}
else if (descriptor instanceof FunctionDescriptor) {
if (((FunctionDescriptor)descriptor).getExtensionReceiverParameter() == null) {
return 3;
return 4;
}
else {
return 2;
return 3;
}
}
else if (descriptor instanceof ClassDescriptor) {
return 2;
}
else if (descriptor instanceof TypeAliasDescriptor) {
return 1;
}
return 0;