mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move getCallableDescriptor function declaration to Utils
GitOrigin-RevId: 151c12f97acdfd95f4bf934eb7b3184230f42208
This commit is contained in:
committed by
intellij-monorepo-bot
parent
324fcb4924
commit
eff8336be7
-3
@@ -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