Fix incremental compilation problems related to type alias constructors
1. Determine source element for descriptors with NO_SOURCE recursively. 2. Always provide type abbreviation for type alias constructor return type. #KT-15495 Fixed
This commit is contained in:
+7
-8
@@ -79,14 +79,13 @@ fun isContainedByCompiledPartOfOurModule(descriptor: DeclarationDescriptor, outD
|
||||
}
|
||||
|
||||
fun getSourceElement(descriptor: DeclarationDescriptor): SourceElement =
|
||||
if (descriptor is CallableMemberDescriptor && descriptor.source === SourceElement.NO_SOURCE) {
|
||||
descriptor.containingDeclaration.toSourceElement
|
||||
}
|
||||
else if (descriptor is DeserializedTypeAliasDescriptor) {
|
||||
descriptor.containingDeclaration.toSourceElement
|
||||
}
|
||||
else {
|
||||
descriptor.toSourceElement
|
||||
when {
|
||||
descriptor is CallableMemberDescriptor && descriptor.source === SourceElement.NO_SOURCE ->
|
||||
getSourceElement(descriptor.containingDeclaration)
|
||||
descriptor is DeserializedTypeAliasDescriptor ->
|
||||
getSourceElement(descriptor.containingDeclaration)
|
||||
else ->
|
||||
descriptor.toSourceElement
|
||||
}
|
||||
|
||||
private val DeclarationDescriptor.toSourceElement: SourceElement
|
||||
|
||||
Reference in New Issue
Block a user