IC mangling: Use empty list as a separator in the new mangling scheme

This commit is contained in:
Ilmir Usmanov
2020-11-13 00:10:04 +01:00
parent 20e7a77b78
commit b33774e5f2
18 changed files with 32 additions and 31 deletions
@@ -76,7 +76,7 @@ fun getManglingSuffixBasedOnKotlinSignature(
private fun collectSignatureForMangling(descriptor: CallableMemberDescriptor, useOldManglingRules: Boolean): String {
val types = listOfNotNull(descriptor.extensionReceiverParameter?.type) + descriptor.valueParameters.map { it.type }
return types.joinToString { getSignatureElementForMangling(it, useOldManglingRules) }
return types.joinToString(separator = if (useOldManglingRules) ", " else "") { getSignatureElementForMangling(it, useOldManglingRules) }
}
private fun getSignatureElementForMangling(type: KotlinType, useOldManglingRules: Boolean): String = buildString {