Cleanup: when possible, do analyzeFully -> analyze
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.idea.intentions.copyConcatenatedStringToClipboard
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeFully
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.collectDescendantsOfType
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
@@ -56,7 +56,7 @@ class ConcatenatedStringGenerator {
|
||||
}
|
||||
|
||||
private fun KtExpression.convertToValueIfCompileTimeConstant(): String? {
|
||||
val resolvedCall = getResolvedCall(analyzeFully()) ?: return null
|
||||
val resolvedCall = getResolvedCall(analyze()) ?: return null
|
||||
val propertyDescriptor = resolvedCall.resultingDescriptor as? PropertyDescriptor ?: return null
|
||||
return propertyDescriptor.compileTimeInitializer?.value?.toString()
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import org.jetbrains.kotlin.diagnostics.Diagnostic
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeFully
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.core.ShortenReferences
|
||||
import org.jetbrains.kotlin.idea.core.quickfix.QuickFixUtil
|
||||
import org.jetbrains.kotlin.idea.project.builtIns
|
||||
@@ -49,7 +49,7 @@ class ChangeFunctionLiteralReturnTypeFix(
|
||||
private val appropriateQuickFix = createAppropriateQuickFix(functionLiteralExpression, type)
|
||||
|
||||
private fun createAppropriateQuickFix(functionLiteralExpression: KtLambdaExpression, type: KotlinType): IntentionAction? {
|
||||
val context = functionLiteralExpression.containingKtFile.analyzeFully()
|
||||
val context = functionLiteralExpression.analyze()
|
||||
val functionLiteralType = context.getType(functionLiteralExpression) ?: error("Type of function literal not available in binding context")
|
||||
|
||||
val builtIns = functionLiteralType.constructor.builtIns
|
||||
|
||||
Reference in New Issue
Block a user