[Analysis API] Add API for obtaining scope with synthetic properties

^KTIJ-22359 Fixed
This commit is contained in:
aleksandrina-streltsova
2022-12-21 18:18:38 +02:00
committed by teamcity
parent e517df1533
commit f3cbc1b2d4
3 changed files with 44 additions and 23 deletions
@@ -72,7 +72,7 @@ internal class KtFe10ScopeProvider(
return KtFe10ScopeMember(DeclaredMemberScope(descriptor), descriptor.constructors, analysisContext)
}
override fun getDelegatedMemberScope(classSymbol: KtSymbolWithMembers): KtScope {
override fun getDelegatedMemberScope(classSymbol: KtSymbolWithMembers): KtScope {
val descriptor = getDescriptor<ClassDescriptor>(classSymbol)
?: return getEmptyScope()
@@ -191,6 +191,11 @@ internal class KtFe10ScopeProvider(
TODO()
}
override fun getSyntheticJavaPropertiesScope(type: KtType): KtTypeScope {
require(type is KtFe10Type)
TODO()
}
override fun getScopeContextForPosition(originalFile: KtFile, positionInFakeFile: KtElement): KtScopeContext {
val elementToAnalyze = positionInFakeFile.containingNonLocalDeclaration() ?: originalFile
val bindingContext = analysisContext.analyze(elementToAnalyze)