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:
+1
-5
@@ -185,11 +185,7 @@ class TypeAliasConstructorDescriptorImpl private constructor(
|
||||
val returnType = run {
|
||||
val returnTypeNoAbbreviation = substitutorForUnderlyingClass.substitute(constructor.returnType, Variance.INVARIANT)
|
||||
?: return null
|
||||
val abbreviation = typeAliasDescriptor.defaultType
|
||||
if (returnTypeNoAbbreviation is SimpleType && abbreviation is SimpleType)
|
||||
returnTypeNoAbbreviation.withAbbreviation(abbreviation)
|
||||
else
|
||||
returnTypeNoAbbreviation
|
||||
returnTypeNoAbbreviation.unwrap().lowerIfFlexible().withAbbreviation(typeAliasDescriptor.defaultType)
|
||||
}
|
||||
|
||||
val receiverParameterType = constructor.dispatchReceiverParameter?.let { substitutorForUnderlyingClass.safeSubstitute(it.type, Variance.INVARIANT) }
|
||||
|
||||
Reference in New Issue
Block a user