From c1f7303fa3d3af16164816c2bba063026267fbb6 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 14 Feb 2018 11:23:09 +0300 Subject: [PATCH] CanBePrimaryConstructorProperty: analyzeFully --> analyze --- .../inspections/CanBePrimaryConstructorPropertyInspection.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/CanBePrimaryConstructorPropertyInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/CanBePrimaryConstructorPropertyInspection.kt index 70ca74a3a37..e935eadaf31 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/CanBePrimaryConstructorPropertyInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/CanBePrimaryConstructorPropertyInspection.kt @@ -10,7 +10,7 @@ import com.intellij.codeInspection.ProblemsHolder import com.intellij.psi.PsiElementVisitor import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor -import org.jetbrains.kotlin.idea.caches.resolve.analyzeFully +import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.idea.intentions.MovePropertyToConstructorIntention import org.jetbrains.kotlin.idea.refactoring.isInterfaceClass import org.jetbrains.kotlin.psi.KtParameter @@ -28,7 +28,7 @@ class CanBePrimaryConstructorPropertyInspection : AbstractKotlinInspection() { if (property.getter != null || property.setter != null || property.delegate != null) return val assigned = property.initializer as? KtReferenceExpression ?: return - val context = property.analyzeFully() + val context = assigned.analyze() val assignedDescriptor = context.get(BindingContext.REFERENCE_TARGET, assigned) as? ValueParameterDescriptor ?: return val containingConstructor = assignedDescriptor.containingDeclaration as? ClassConstructorDescriptor ?: return