[Manglers] Uniform handling of the error type in signature mangled names in all manglers
^KT-63723
This commit is contained in:
committed by
Space Team
parent
089b7f31b5
commit
194efac68c
+5
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.ir.descriptors.IrPropertyDelegateDescriptor
|
||||
import org.jetbrains.kotlin.renderer.DescriptorRenderer
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.checker.SimpleClassicTypeSystemContext
|
||||
import org.jetbrains.kotlin.types.error.ErrorClassDescriptor
|
||||
import org.jetbrains.kotlin.types.model.TypeSystemContext
|
||||
import org.jetbrains.kotlin.types.typeUtil.isUnit
|
||||
|
||||
@@ -92,6 +93,10 @@ open class DescriptorMangleComputer(builder: StringBuilder, mode: MangleMode) :
|
||||
is SimpleType -> {
|
||||
|
||||
when (val classifier = type.constructor.declarationDescriptor) {
|
||||
is ErrorClassDescriptor -> {
|
||||
tBuilder.appendSignature(MangleConstant.ERROR_MARK)
|
||||
return
|
||||
}
|
||||
is ClassDescriptor -> with(copy(MangleMode.FQNAME)) { classifier.visit() }
|
||||
is TypeParameterDescriptor -> tBuilder.mangleTypeParameterReference(classifier)
|
||||
else -> error("Unexpected classifier: $classifier")
|
||||
|
||||
Reference in New Issue
Block a user