diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtCodeFragment.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtCodeFragment.kt index 6f8c19c9302..dc54dcb17fc 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtCodeFragment.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtCodeFragment.kt @@ -177,7 +177,7 @@ abstract class KtCodeFragment( fun getOriginalContext(): KtElement? { val contextElement = getContext() as? KtElement - val contextFile = contextElement?.containingKtFile + val contextFile = contextElement?.containingFile as? KtFile if (contextFile is KtCodeFragment) { return contextFile.getOriginalContext() }