Introduce FunctionDescriptor.initialSignatureDescriptor

Mostly it's needed for backend to extract descriptor with initial signature

For example:
class A implements CharSequence {
        char charAt(int index) {}
}

We see `charAt` this method as `fun get(index: Int): Char`, but in backend it
matters what signature had this descriptor before.
This commit is contained in:
Denis Zharkov
2015-10-29 18:51:24 +03:00
parent 95d12260c1
commit 291f0e57d1
10 changed files with 72 additions and 18 deletions
@@ -173,12 +173,14 @@ class SamAdapterFunctionsScope(storageManager: StorageManager) : BaseImportingSc
newExtensionReceiverParameterType: KotlinType?,
newReturnType: KotlinType,
name: Name?,
preserveSource: Boolean
preserveSource: Boolean,
signatureChange: Boolean
): FunctionDescriptor? {
val descriptor = super.doSubstitute(
originalSubstitutor, newOwner, newModality, newVisibility,
newIsOperator, newIsInfix, newIsExternal, newIsInline, newIsTailrec, original,
copyOverrides, kind, newValueParameterDescriptors, newExtensionReceiverParameterType, newReturnType, name, preserveSource)
copyOverrides, kind, newValueParameterDescriptors, newExtensionReceiverParameterType, newReturnType, name,
preserveSource, signatureChange)
as MyFunctionDescriptor? ?: return null
if (original == null) {