From ae9f6fa5fcaf5d78abd86c8cc9f590f5bfcdb682 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Wed, 23 Apr 2014 19:27:47 +0400 Subject: [PATCH] Fix compilation --- .../jet/plugin/completion/handlers/GenerateLambda.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/completion/handlers/GenerateLambda.kt b/idea/src/org/jetbrains/jet/plugin/completion/handlers/GenerateLambda.kt index 6c5eb9cfffc..786cfa29af5 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/handlers/GenerateLambda.kt +++ b/idea/src/org/jetbrains/jet/plugin/completion/handlers/GenerateLambda.kt @@ -23,8 +23,8 @@ import com.intellij.psi.PsiDocumentManager import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.jet.lang.psi.JetExpression import org.jetbrains.jet.plugin.completion.ExpectedInfos -import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache import org.jetbrains.jet.lang.psi.JetFile +import org.jetbrains.jet.plugin.caches.resolve.getLazyResolveSession fun insertLambdaTemplate(context: InsertionContext, placeholderRange: TextRange, lambdaType: JetType) { val explicitParameterTypes = needExplicitParameterTypes(context, placeholderRange, lambdaType) @@ -68,7 +68,7 @@ private fun needExplicitParameterTypes(context: InsertionContext, placeholderRan val expression = PsiTreeUtil.findElementOfClassAtRange(file, placeholderRange.getStartOffset(), placeholderRange.getEndOffset(), javaClass()) if (expression == null) return false - val resolveSession = AnalyzerFacadeWithCache.getLazyResolveSessionForFile(file) + val resolveSession = file.getLazyResolveSession() val bindingContext = resolveSession.resolveToElement(expression) val expectedInfos = ExpectedInfos(bindingContext, resolveSession.getModuleDescriptor()).calculate(expression) ?: return false val functionTypes = expectedInfos.map { it.`type` }.filter { KotlinBuiltIns.getInstance().isExactFunctionOrExtensionFunctionType(it) }.toSet()