[FIR] Fix ambiguity of Throws and other std annotations importing
Including `SharedImmutable` and `ThreadLocal` Simplify code, remove `DefaultImportPriority.KOTLIN_THROWS` Introduce `FirNativeClassMapper`
This commit is contained in:
committed by
Space Team
parent
adf4f823ae
commit
115d685d91
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
|
||||
import org.jetbrains.kotlin.fir.scopes.FirPlatformClassMapper
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.JvmStandardClassIds
|
||||
|
||||
@NoMutableState
|
||||
class FirJavaClassMapper(private val session: FirSession) : FirPlatformClassMapper() {
|
||||
@@ -30,4 +31,8 @@ class FirJavaClassMapper(private val session: FirSession) : FirPlatformClassMapp
|
||||
if (classId == null) return null
|
||||
return JavaToKotlinClassMap.mapJavaToKotlin(classId.asSingleFqName())
|
||||
}
|
||||
|
||||
override val classTypealiasesThatDontCauseAmbiguity: Map<ClassId, ClassId> = mapOf(
|
||||
JvmStandardClassIds.Annotations.Throws to JvmStandardClassIds.Annotations.ThrowsAlias,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user