[Analysis API] introduce base KtTypeScope -> KtScope converter

This commit is contained in:
Ilya Kirillov
2022-06-08 13:39:57 +02:00
parent c52d33d215
commit 7b1765cc8b
8 changed files with 84 additions and 2 deletions
@@ -57,6 +57,7 @@ class KtFe10AnalysisSession(
override val analysisScopeProviderImpl: KtAnalysisScopeProvider = KtAnalysisScopeProviderImpl(this, token)
override val referenceResolveProviderImpl: KtReferenceResolveProvider = KtFe10ReferenceResolveProvider(this)
override val substitutionProviderImpl: KtSignatureSubsitutor = KtFe10SignatureSubsitutor(this)
override val scopeSubstitutionImpl: KtScopeSubstitution = KtFe10ScopeSubstitution(this)
override fun createContextDependentCopy(originalKtFile: KtFile, elementToReanalyze: KtElement): KtAnalysisSession =
withValidityAssertion {
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2022 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.components.KtScopeSubstitution
import org.jetbrains.kotlin.analysis.api.descriptors.KtFe10AnalysisSession
import org.jetbrains.kotlin.analysis.api.descriptors.components.base.Fe10KtAnalysisSessionComponent
import org.jetbrains.kotlin.analysis.api.scopes.KtScope
import org.jetbrains.kotlin.analysis.api.scopes.KtTypeScope
internal class KtFe10ScopeSubstitution(
override val analysisSession: KtFe10AnalysisSession,
) : KtScopeSubstitution(), Fe10KtAnalysisSessionComponent {
override fun getDeclarationScope(scope: KtTypeScope): KtScope {
TODO()
}
}