Do not perform type alias expansion for error types.

This commit is contained in:
Dmitry Petrov
2016-06-08 16:13:03 +03:00
parent b2e5cfebee
commit ccbade663b
@@ -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