Reformat JoinDeclarationAndAssignmentIntention
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d45e83b27d
commit
8078c5da40
+3
-3
@@ -59,7 +59,8 @@ class JoinDeclarationAndAssignmentIntention : SelfTargetingRangeIntention<KtProp
|
|||||||
|| element.setter != null
|
|| element.setter != null
|
||||||
|| element.getter != null
|
|| element.getter != null
|
||||||
|| element.receiverTypeReference != null
|
|| element.receiverTypeReference != null
|
||||||
|| element.name == null) {
|
|| element.name == null
|
||||||
|
) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,8 +110,7 @@ class JoinDeclarationAndAssignmentIntention : SelfTargetingRangeIntention<KtProp
|
|||||||
val assignments = mutableListOf<KtBinaryExpression>()
|
val assignments = mutableListOf<KtBinaryExpression>()
|
||||||
fun process(binaryExpr: KtBinaryExpression) {
|
fun process(binaryExpr: KtBinaryExpression) {
|
||||||
if (binaryExpr.operationToken != KtTokens.EQ) return
|
if (binaryExpr.operationToken != KtTokens.EQ) return
|
||||||
val left = binaryExpr.left
|
val leftReference = when (val left = binaryExpr.left) {
|
||||||
val leftReference = when (left) {
|
|
||||||
is KtNameReferenceExpression ->
|
is KtNameReferenceExpression ->
|
||||||
left
|
left
|
||||||
is KtDotQualifiedExpression ->
|
is KtDotQualifiedExpression ->
|
||||||
|
|||||||
Reference in New Issue
Block a user