[analysis] remove redundant OptIn annotations
This commit is contained in:
-2
@@ -97,7 +97,6 @@ object KtDeclarationAndFirDeclarationEqualityChecker {
|
||||
return true
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
private fun FirTypeRef.renderTypeAsKotlinType(isVararg: Boolean = false): String {
|
||||
val rendered = when (this) {
|
||||
is FirResolvedTypeRef -> type.renderTypeAsKotlinType()
|
||||
@@ -147,7 +146,6 @@ object KtDeclarationAndFirDeclarationEqualityChecker {
|
||||
return "kotlin.Array<out $this>"
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
private val classIdToName: Map<String, String> = buildList<Pair<String, String>> {
|
||||
StandardClassIds.primitiveArrayTypeByElementType.mapTo(this) { (classId, arrayClassId) ->
|
||||
classId.asString().replace('/', '.') to arrayClassId.asString().replace('/', '.')
|
||||
|
||||
-1
@@ -57,7 +57,6 @@ internal class FileStructure private constructor(
|
||||
?: error("FileStructureElement for was not defined for \n${declaration.getElementTextInContext()}")
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun getAllDiagnosticsForFile(diagnosticCheckerFilter: DiagnosticCheckerFilter): Collection<KtPsiDiagnostic> {
|
||||
val structureElements = getAllStructureElements()
|
||||
|
||||
|
||||
-1
@@ -189,7 +189,6 @@ internal open class FirElementsRecorder : FirVisitor<Unit, MutableMap<KtElement,
|
||||
}
|
||||
|
||||
companion object {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun recordElementsFrom(firElement: FirElement, recorder: FirElementsRecorder): Map<KtElement, FirElement> =
|
||||
buildMap { firElement.accept(recorder, this) }
|
||||
}
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ class LLFirBuiltinSymbolProvider(
|
||||
moduleData: FirModuleData,
|
||||
kotlinScopeProvider: FirKotlinScopeProvider
|
||||
) : FirBuiltinSymbolProvider(session, moduleData, kotlinScopeProvider) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
private val functionsCache = session.firCachesFactory.createCache { callableId: CallableId ->
|
||||
buildList {
|
||||
getTopLevelFunctionSymbolsToByPackageFragments(this, callableId.packageName, callableId.callableName)
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.fir.BuiltinTypes
|
||||
import org.jetbrains.kotlin.fir.PrivateSessionConstructor
|
||||
|
||||
@OptIn(PrivateSessionConstructor::class)
|
||||
class LLFirBuiltinsAndCloneableSession @PrivateSessionConstructor constructor(
|
||||
override val ktModule: KtModule,
|
||||
project: Project,
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ import org.jetbrains.kotlin.fir.PrivateSessionConstructor
|
||||
/**
|
||||
* [org.jetbrains.kotlin.fir.FirSession] responsible for all libraries analysing module transitively depends on
|
||||
*/
|
||||
@OptIn(PrivateSessionConstructor::class)
|
||||
internal class LLFirLibrarySession @PrivateSessionConstructor constructor(
|
||||
override val ktModule: KtModule,
|
||||
project: Project,
|
||||
|
||||
-1
@@ -114,7 +114,6 @@ private class LLFirSessionsCache {
|
||||
return newMappings to result
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
private fun getSessions(): Map<KtModule, LLFirSession> = buildMap {
|
||||
val sessions = mappings.values
|
||||
val wasSessionInvalidated = sessions.associateWithTo(hashMapOf()) { false }
|
||||
|
||||
-1
@@ -92,7 +92,6 @@ abstract class AbstractFileStructureTest : AbstractLowLevelApiSingleFileTest() {
|
||||
return session.moduleComponents.fileStructureCache.getFileStructure(this)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
private fun FileStructure.getAllStructureElements(ktFile: KtFile): Collection<FileStructureElement> = buildSet {
|
||||
ktFile.forEachDescendantOfType<KtElement> { ktElement ->
|
||||
add(getStructureElementFor(ktElement))
|
||||
|
||||
Reference in New Issue
Block a user