From 539b84b56127f0d156e358db33857ccb9819583b Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Thu, 10 Dec 2015 17:20:28 +0300 Subject: [PATCH] Minor, stricter check for when deciding whether to build light class for decompiled declaration --- .../idea/caches/resolve/IDELightClassGenerationSupport.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 2323b705448..19176a70ba5 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 @@ -32,6 +32,7 @@ import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.kotlin.asJava.* import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.fileClasses.javaFileFacadeFqName +import org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile import org.jetbrains.kotlin.idea.decompiler.navigation.SourceNavigationHelper import org.jetbrains.kotlin.idea.project.ResolveElementCache import org.jetbrains.kotlin.idea.stubindex.* @@ -266,7 +267,7 @@ public class IDELightClassGenerationSupport(private val project: Project) : Ligh return null } val containingJetFile = decompiledClassOrObject.getContainingKtFile() - if (!containingJetFile.isCompiled) { + if (containingJetFile !is KtClsFile) { return null } val rootLightClassForDecompiledFile = createLightClassForDecompiledKotlinFile(containingJetFile) ?: return null