diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/jetRefactoringUtil.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/jetRefactoringUtil.kt index 735e91e6e3e..6bf99ddb93f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/jetRefactoringUtil.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/jetRefactoringUtil.kt @@ -361,6 +361,8 @@ public fun chooseContainerElement( } private fun PsiElement.renderDeclaration(): String? { + if (this is KtFunctionLiteral || isFunctionalExpression()) return renderText() + val descriptor = when { this is KtFile -> getName() this is KtElement -> analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this]