Override/Implement Members: Do not expand type aliases in the generated members. Retain abbreviated types during flexible type approximation

#KT-13244 Fixed
This commit is contained in:
Alexey Sedunov
2016-08-08 16:25:22 +03:00
parent 1a4ff598e3
commit 1b546d18ff
9 changed files with 34 additions and 0 deletions
@@ -64,6 +64,10 @@ private fun KotlinType.approximateNonDynamicFlexibleTypes(preferNotNull: Boolean
return approximation
}
(unwrap() as? AbbreviatedType)?.let {
return AbbreviatedType(it.expandedType, it.abbreviation.approximateNonDynamicFlexibleTypes(preferNotNull))
}
return KotlinTypeFactory.simpleType(annotations,
constructor,
arguments.map { it.substitute { type -> type.approximateFlexibleTypes(preferNotNull = true) } },