[LL FIR, Java] fix resolve contract violation from java symbol provider from permits
To create a smart psi type pointer, IJ Platform uses resolve We cannot use resolve from JavaSymbolProvider, as it may lead to resolve contract violation ^KT-59243 Fixed
This commit is contained in:
committed by
Space Team
parent
5af8b9e819
commit
7631e90f12
@@ -381,11 +381,13 @@ abstract class FirJavaFacade(
|
||||
}
|
||||
}.apply {
|
||||
if (modality == Modality.SEALED) {
|
||||
val inheritors = javaClass.permittedTypes.mapNotNull { classifierType ->
|
||||
val classifier = classifierType.classifier as? JavaClass
|
||||
classifier?.let { JavaToKotlinClassMap.mapJavaToKotlin(it.fqName!!) }
|
||||
val permittedTypes = javaClass.permittedTypes
|
||||
setSealedClassInheritors {
|
||||
permittedTypes.mapNotNull { classifierType ->
|
||||
val classifier = classifierType.classifier as? JavaClass
|
||||
classifier?.let { JavaToKotlinClassMap.mapJavaToKotlin(it.fqName!!) }
|
||||
}
|
||||
}
|
||||
setSealedClassInheritors(inheritors)
|
||||
}
|
||||
|
||||
if (classIsAnnotation) {
|
||||
|
||||
Reference in New Issue
Block a user