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