Refactoring. Removed all usages of asSimpleType except related to TypeSubstitution.

This commit is contained in:
Stanislav Erokhin
2016-06-02 15:45:07 +03:00
parent dd362f683c
commit 797ef8d143
17 changed files with 93 additions and 65 deletions
@@ -377,7 +377,7 @@ public class DescriptorSerializer {
builder.addTypeParameter(typeParameter(typeParameterDescriptor));
}
KotlinType underlyingType = descriptor.getUnderlyingType();
SimpleType underlyingType = descriptor.getUnderlyingType();
if (useTypeTable()) {
builder.setUnderlyingTypeId(typeId(underlyingType));
}
@@ -385,7 +385,7 @@ public class DescriptorSerializer {
builder.setUnderlyingType(type(underlyingType));
}
KotlinType expandedType = descriptor.getExpandedType();
SimpleType expandedType = descriptor.getExpandedType();
if (useTypeTable()) {
builder.setExpandedTypeId(typeId(expandedType));
}
@@ -548,13 +548,13 @@ public class DescriptorSerializer {
builder.setNullable(type.isMarkedNullable());
}
KotlinType abbreviatedType = SpecialTypesKt.getAbbreviatedType(type);
AbbreviatedType abbreviatedType = SpecialTypesKt.getAbbreviatedType(type);
if (abbreviatedType != null) {
if (useTypeTable()) {
builder.setAbbreviatedTypeId(typeId(abbreviatedType));
builder.setAbbreviatedTypeId(typeId(abbreviatedType.getAbbreviation()));
}
else {
builder.setAbbreviatedType(type(abbreviatedType));
builder.setAbbreviatedType(type(abbreviatedType.getAbbreviation()));
}
}