FIR IDE: add helper to resolve call for any KtElement
This commit is contained in:
committed by
Ilya Kirillov
parent
523cb4b3e8
commit
1a22124c02
+9
-1
@@ -36,4 +36,12 @@ public interface KtCallResolverMixIn : KtAnalysisSessionMixIn {
|
||||
|
||||
public fun KtArrayAccessExpression.resolveCall(): KtCall? =
|
||||
analysisSession.callResolver.resolveCall(this)
|
||||
}
|
||||
|
||||
public fun KtElement.resolveCallIfPossible(): KtCall? = when (this) {
|
||||
is KtCallElement -> resolveCall()
|
||||
is KtBinaryExpression -> resolveCall()
|
||||
is KtUnaryExpression -> resolveCall()
|
||||
is KtArrayAccessExpression -> resolveCall()
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user