[Analysis Api] Expose klibSourceFile via KtKlibSourceFileProviderMixIn
This `klibSourceFile` information is deserialized from klibs to retain the information of the original SourceFile location of a declaration. ^KT-66271 Fixed
This commit is contained in:
committed by
Space Team
parent
6d8a4a28af
commit
6b98602afc
+1
@@ -65,6 +65,7 @@ class KtFe10AnalysisSession(
|
||||
override val resolveExtensionInfoProviderImpl: KtResolveExtensionInfoProvider = KtFe10ResolveExtensionInfoProvider(this)
|
||||
override val compilerFacilityImpl: KtCompilerFacility = KtFe10CompilerFacility(this)
|
||||
override val dataFlowInfoProviderImpl: KtDataFlowInfoProvider = KtFe10DataFlowInfoProvider(this)
|
||||
override val klibSourceFileProviderImpl: KtKlibSourceFileNameProvider = KtFe10KlibSourceFileNameProvider(this)
|
||||
|
||||
override val metadataCalculatorImpl: KtMetadataCalculator
|
||||
get() = throw NotSupportedForK1Exception()
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.descriptors.components
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisNonPublicApi
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.components.KtKlibSourceFileNameProvider
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtDeclarationSymbol
|
||||
|
||||
@OptIn(KtAnalysisNonPublicApi::class)
|
||||
internal class KtFe10KlibSourceFileNameProvider(
|
||||
override val analysisSession: KtAnalysisSession,
|
||||
) : KtKlibSourceFileNameProvider() {
|
||||
override fun getKlibSourceFileName(declaration: KtDeclarationSymbol): String? {
|
||||
throw NotImplementedError("Method is not implemented for FE 1.0")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user