FIR: Map raw types properly

This commit is contained in:
Denis Zharkov
2020-02-10 10:54:57 +03:00
parent b3f9fa22b4
commit becc9c21f0
@@ -170,12 +170,18 @@ internal fun JavaClassifierType.toConeKotlinTypeWithNullability(
classId = classId.readOnlyToMutable() ?: classId
val lookupTag = ConeClassLikeLookupTagImpl(classId)
lookupTag.constructClassType(
typeArguments.map { argument ->
val mappedTypeArguments = when (isRaw) {
true -> classifier.typeParameters.map { ConeStarProjection }
false -> typeArguments.map { argument ->
argument.toConeProjection(
session, javaTypeParameterStack, boundTypeParameter = null, nullability = typeParametersNullability
)
}.toTypedArray(), nullability.isNullable
}
}
lookupTag.constructClassType(
mappedTypeArguments.toTypedArray(), nullability.isNullable
)
}
is JavaTypeParameter -> {