[K/N] Drop merging forward and real declaration in deserializer

^KT-59643
This commit is contained in:
Pavel Kunyavskiy
2023-07-11 14:05:34 +02:00
committed by Space Team
parent e4c2fa1080
commit d797505f06
15 changed files with 19 additions and 126 deletions
@@ -91,21 +91,10 @@ open class DescriptorMangleComputer(builder: StringBuilder, mode: MangleMode) :
when (val type = wrappedType.unwrap()) {
is SimpleType -> {
if (type is SupposititiousSimpleType) {
val classId = type.overwrittenClass
classId.packageFqName.let {
if (!it.isRoot) {
builder.appendSignature(it.asString())
builder.appendSignature(MangleConstant.FQN_SEPARATOR)
}
builder.appendSignature(classId.relativeClassName.asString())
}
} else {
when (val classifier = type.constructor.declarationDescriptor) {
is ClassDescriptor -> with(copy(MangleMode.FQNAME)) { classifier.visit() }
is TypeParameterDescriptor -> tBuilder.mangleTypeParameterReference(classifier)
else -> error("Unexpected classifier: $classifier")
}
when (val classifier = type.constructor.declarationDescriptor) {
is ClassDescriptor -> with(copy(MangleMode.FQNAME)) { classifier.visit() }
is TypeParameterDescriptor -> tBuilder.mangleTypeParameterReference(classifier)
else -> error("Unexpected classifier: $classifier")
}
mangleTypeArguments(tBuilder, type, null)