Do not perform type alias expansion for error types.
This commit is contained in:
@@ -113,13 +113,15 @@ class TypeAliasExpander(
|
|||||||
): TypeProjection {
|
): TypeProjection {
|
||||||
val type = originalProjection.type
|
val type = originalProjection.type
|
||||||
|
|
||||||
if (!type.requiresTypeAliasExpansion()) {
|
if (type.isError || !type.requiresTypeAliasExpansion()) {
|
||||||
return originalProjection
|
return originalProjection
|
||||||
}
|
}
|
||||||
|
|
||||||
val typeConstructor = type.constructor
|
val typeConstructor = type.constructor
|
||||||
val typeDescriptor = typeConstructor.declarationDescriptor
|
val typeDescriptor = typeConstructor.declarationDescriptor
|
||||||
|
|
||||||
|
assert(typeConstructor.parameters.size == type.arguments.size) { "Unexpected malformed type: $type" }
|
||||||
|
|
||||||
when (typeDescriptor) {
|
when (typeDescriptor) {
|
||||||
is TypeParameterDescriptor -> {
|
is TypeParameterDescriptor -> {
|
||||||
return originalProjection
|
return originalProjection
|
||||||
|
|||||||
Reference in New Issue
Block a user