Create isCallee utility function

This commit is contained in:
Nikolay Krasko
2017-07-26 15:26:13 +03:00
parent 142a64e039
commit 1b93e2030f
4 changed files with 84 additions and 3 deletions
@@ -82,8 +82,6 @@ class RenameUnresolvedReferenceFix(element: KtNameReferenceExpression): KotlinQu
&& element.getStrictParentOfType<KtTypeReference>() == null
}
private fun KtExpression.isCallee() = getParentOfTypeAndBranch<KtCallElement> { calleeExpression } != null
override fun invoke(project: Project, editor: Editor?, file: KtFile) {
val element = element ?: return
if (editor == null) return