Move getCallableDescriptor function declaration to Utils
This commit is contained in:
committed by
Mikhail Glukhikh
parent
f48eacfbd4
commit
dd4ceb8c0f
@@ -17,12 +17,9 @@
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToCall
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
|
||||
|
||||
internal fun KtExpression.getCallableDescriptor() = resolveToCall()?.resultingDescriptor
|
||||
|
||||
internal fun KtExpression.getArguments() = when (this) {
|
||||
is KtBinaryExpression -> this.left to this.right
|
||||
is KtDotQualifiedExpression -> this.receiverExpression to this.callExpression?.valueArguments?.singleOrNull()?.getArgumentExpression()
|
||||
|
||||
@@ -306,3 +306,5 @@ fun KtBlockExpression.getParentLambdaLabelName(): String? {
|
||||
val lambdaLabelName = (valueArgument.getArgumentExpression() as? KtLabeledExpression)?.getLabelName()
|
||||
return lambdaLabelName ?: callExpression.getCallNameExpression()?.text
|
||||
}
|
||||
|
||||
internal fun KtExpression.getCallableDescriptor() = resolveToCall()?.resultingDescriptor
|
||||
Reference in New Issue
Block a user