diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt index 680be215c77..6bf533bb124 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt @@ -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 -> {