Name Suggester: Suggest parameter name for the corresponding argument expression
#KT-8111 Fixed
This commit is contained in:
@@ -406,4 +406,16 @@ public fun KtDeclaration.visibilityModifier(): PsiElement? {
|
||||
public fun KtDeclaration.visibilityModifierType(): KtModifierKeywordToken?
|
||||
= visibilityModifier()?.node?.elementType as KtModifierKeywordToken?
|
||||
|
||||
public fun KtStringTemplateExpression.isPlain() = entries.all { it is KtLiteralStringTemplateEntry }
|
||||
public fun KtStringTemplateExpression.isPlain() = entries.all { it is KtLiteralStringTemplateEntry }
|
||||
|
||||
public fun KtExpression.getOutermostParenthesizerOrThis(): KtExpression {
|
||||
return (parentsWithSelf zip parents).firstOrNull {
|
||||
val (element, parent) = it
|
||||
when (parent) {
|
||||
is KtParenthesizedExpression -> false
|
||||
is KtAnnotatedExpression -> parent.baseExpression != element
|
||||
is KtLabeledExpression -> parent.baseExpression != element
|
||||
else -> true
|
||||
}
|
||||
}?.first as KtExpression? ?: this
|
||||
}
|
||||
Reference in New Issue
Block a user