From af32cad1aeb1746a26159fd05adb1ac4fb65bb0a Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 10 Feb 2020 11:13:40 +0200 Subject: [PATCH] Minor --- idea/src/org/jetbrains/kotlin/idea/slicer/InflowSlicer.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/slicer/InflowSlicer.kt b/idea/src/org/jetbrains/kotlin/idea/slicer/InflowSlicer.kt index a74d9b4a95a..5e43f7d2c52 100644 --- a/idea/src/org/jetbrains/kotlin/idea/slicer/InflowSlicer.kt +++ b/idea/src/org/jetbrains/kotlin/idea/slicer/InflowSlicer.kt @@ -60,11 +60,12 @@ class InflowSlicer( } private fun processProperty(property: KtProperty) { - val bindingContext by lazy { property.analyzeWithContent() } - if (property.hasDelegateExpression()) { val getter = (property.unsafeResolveToDescriptor() as VariableDescriptorWithAccessors).getter - val delegateGetterResolvedCall = getter?.let { bindingContext[BindingContext.DELEGATED_PROPERTY_RESOLVED_CALL, it] } + val delegateGetterResolvedCall = getter?.let { + val bindingContext = property.analyzeWithContent() + bindingContext[BindingContext.DELEGATED_PROPERTY_RESOLVED_CALL, it] + } delegateGetterResolvedCall?.resultingDescriptor?.originalSource?.getPsi()?.passToProcessor() return }