Revert "Add indent before accessor for extension property (KT-33131)"

This reverts commit ab34f8c7

^KT-42560 Fixed
This commit is contained in:
Dmitry Gridin
2020-10-09 19:44:50 +07:00
parent 852d705c71
commit 434139d986
7 changed files with 2 additions and 45 deletions
@@ -328,15 +328,10 @@ abstract class KotlinCommonBlock(
}
if (newChildIndex > 0) {
val prevNode = mySubBlocks?.get(newChildIndex - 1)?.node
if (prevNode?.elementType == MODIFIER_LIST) {
val prevBlock = mySubBlocks?.get(newChildIndex - 1)
if (prevBlock?.node?.elementType == MODIFIER_LIST) {
return ChildAttributes(Indent.getNoneIndent(), null)
}
val property = prevNode?.psi as? KtProperty
if (property?.receiverTypeReference != null && property.accessors.isNotEmpty()) {
val indent = if (type in CODE_BLOCKS) Indent.getContinuationIndent() else Indent.getNormalIndent()
return ChildAttributes(indent, null)
}
}
return when (type) {