Minor: simplify isCalling
This commit is contained in:
@@ -59,7 +59,7 @@ fun KtCallExpression.isCalling(fqName: FqName, context: BindingContext = analyze
|
||||
|
||||
fun KtCallExpression.isCalling(fqNames: List<FqName>, context: BindingContext = analyze(BodyResolveMode.PARTIAL)): Boolean {
|
||||
val calleeText = calleeExpression?.text ?: return false
|
||||
val fqName = fqNames.firstOrNull { fqName -> fqName.asString().takeLastWhile { it != '.' } == calleeText } ?: return false
|
||||
val fqName = fqNames.firstOrNull { fqName -> fqName.shortName().asString() == calleeText } ?: return false
|
||||
return getResolvedCall(context)?.isCalling(fqName) == true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user