[FIR] Keep bare type for type alias case

This commit is contained in:
Mikhail Glukhikh
2020-09-01 15:52:04 +03:00
parent 3a5d0ab427
commit db2e3f219f
3 changed files with 4 additions and 2 deletions
@@ -71,6 +71,9 @@ private fun mapTypeAliasArguments(
abbreviatedType: ConeClassLikeType,
resultingType: ConeClassLikeType,
): ConeKotlinType {
if (typeAlias.typeParameters.isNotEmpty() && abbreviatedType.typeArguments.isEmpty()) {
return resultingType.lookupTag.constructClassType(emptyArray(), resultingType.isNullable)
}
val typeAliasMap = typeAlias.typeParameters.map { it.symbol }.zip(abbreviatedType.typeArguments).toMap()
val substitutor = object : AbstractConeSubstitutor() {