From 44a37f5dadba09eef66ca6964126ce2b36e2d615 Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Thu, 1 Mar 2018 16:25:38 +0300 Subject: [PATCH] 181: Uast: `KotlinAccessorCallExpression.methodIdentifier` fix --- .../KotlinUSimpleReferenceExpression.kt.181 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/expressions/KotlinUSimpleReferenceExpression.kt.181 b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/expressions/KotlinUSimpleReferenceExpression.kt.181 index 662858a2c38..3390745f886 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/expressions/KotlinUSimpleReferenceExpression.kt.181 +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/expressions/KotlinUSimpleReferenceExpression.kt.181 @@ -97,11 +97,11 @@ open class KotlinUSimpleReferenceExpression( } class KotlinAccessorCallExpression( - override val psi: KtElement, - override val uastParent: KotlinUSimpleReferenceExpression, - private val resolvedCall: ResolvedCall<*>, - private val accessorDescriptor: DeclarationDescriptor, - val setterValue: KtExpression? + override val psi: KtSimpleNameExpression, + override val uastParent: KotlinUSimpleReferenceExpression, + private val resolvedCall: ResolvedCall<*>, + private val accessorDescriptor: DeclarationDescriptor, + val setterValue: KtExpression? ) : UCallExpressionEx, JvmDeclarationUElement { override val methodName: String? get() = accessorDescriptor.name.asString() @@ -126,8 +126,7 @@ open class KotlinUSimpleReferenceExpression( type.toPsiType(this, psi, boxed = true) } - override val methodIdentifier: UIdentifier? - get() = KotlinUIdentifier(uastParent.psi, this) + override val methodIdentifier: UIdentifier? by lazy { KotlinUIdentifier(psi.getReferencedNameElement(), this) } override val classReference: UReferenceExpression? get() = null