diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt index 74e62bac511..43a5bae74b4 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt @@ -162,7 +162,7 @@ class CliLightClassGenerationSupport(project: Project) : LightClassGenerationSup override fun analyze(element: KtElement) = bindingContext - override fun analyzeFully(element: KtElement) = bindingContext + override fun analyzeWithDeclarations(element: KtClassOrObject) = bindingContext override fun getFacadeClasses(facadeFqName: FqName, scope: GlobalSearchScope): Collection { val filesForFacade = findFilesForFacade(facadeFqName, scope) diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/LightClassGenerationSupport.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/LightClassGenerationSupport.kt index 68df43a1478..2d1a25b292e 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/LightClassGenerationSupport.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/LightClassGenerationSupport.kt @@ -67,7 +67,7 @@ abstract class LightClassGenerationSupport { abstract fun analyze(element: KtElement): BindingContext - abstract fun analyzeFully(element: KtElement): BindingContext + abstract fun analyzeWithDeclarations(element: KtClassOrObject): BindingContext abstract fun getFacadeClasses(facadeFqName: FqName, scope: GlobalSearchScope): Collection diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiReferenceList.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiReferenceList.kt index ba1d90cca4f..b1d47ee9542 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiReferenceList.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiReferenceList.kt @@ -24,6 +24,7 @@ import com.intellij.psi.PsiReferenceList.Role import org.jetbrains.kotlin.asJava.LightClassGenerationSupport import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.asJava.classes.lazyPub +import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtPsiFactory import org.jetbrains.kotlin.psi.KtSuperTypeList import org.jetbrains.kotlin.psi.KtSuperTypeListEntry @@ -42,7 +43,7 @@ class KtLightPsiReferenceList ( override val kotlinOrigin by lazyPub { val superTypeList = this@KtLightPsiReferenceList.kotlinOrigin ?: return@lazyPub null val fqNameToFind = clsDelegate.qualifiedName ?: return@lazyPub null - val context = LightClassGenerationSupport.getInstance(project).analyzeFully(superTypeList) + val context = LightClassGenerationSupport.getInstance(project).analyzeWithDeclarations(superTypeList.parent as KtClassOrObject) superTypeList.entries.firstOrNull { val referencedType = context[BindingContext.TYPE, it.typeReference] referencedType?.constructor?.declarationDescriptor?.fqNameUnsafe?.asString() == fqNameToFind diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt index 87d59f6f284..d4c09a78341 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt @@ -237,7 +237,7 @@ class IDELightClassGenerationSupport(private val project: Project) : LightClassG override fun analyze(element: KtElement) = element.analyze(BodyResolveMode.PARTIAL) - override fun analyzeFully(element: KtElement) = element.analyzeFully() + override fun analyzeWithDeclarations(element: KtClassOrObject) = element.analyzeWithDeclarations() override fun getFacadeNames(packageFqName: FqName, scope: GlobalSearchScope): Collection { val facadeFilesInPackage = runReadAction {