FIR Java: map classes to make java type-parameters have correct bounds
Really, this commit implements early J2K mapping for all Java types. It's questionable and probably wrong at least for super-types, because, for example, we cannot resolve spliterator() in classes derived from java.lang.Iterable
This commit is contained in:
committed by
Mikhail Glukhikh
parent
cb91c6b977
commit
3e69838f48
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.java
|
||||
|
||||
import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
@@ -142,7 +143,9 @@ internal fun JavaClassifierType.toConeKotlinTypeWithNullability(
|
||||
): ConeLookupTagBasedType {
|
||||
return when (val classifier = classifier) {
|
||||
is JavaClass -> {
|
||||
val classId = classifier.classId!!
|
||||
//val classId = classifier.classId!!
|
||||
val classId = JavaToKotlinClassMap.mapJavaToKotlin(classifier.fqName!!) ?: classifier.classId!!
|
||||
|
||||
val lookupTag = ConeClassLikeLookupTagImpl(classId)
|
||||
lookupTag.constructClassType(
|
||||
typeArguments.mapIndexed { index, argument ->
|
||||
|
||||
Reference in New Issue
Block a user