From ca573093742b0a7398c3b166b5e533360cef0810 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 17 Jan 2018 11:30:01 +0100 Subject: [PATCH] Temp revert fix for KT-10591 as it causes non-obvious test breakage --- .../org/jetbrains/kotlin/idea/formatter/KotlinCommonBlock.kt | 2 +- .../FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt | 4 ++-- .../FormatFirstColumnCommentsBeforeDeclaration.after.kt | 4 ++-- idea/testData/indentationOnNewline/KT20783.after.kt | 4 ++-- idea/testData/indentationOnNewline/KT20783.kt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/idea/formatter/src/org/jetbrains/kotlin/idea/formatter/KotlinCommonBlock.kt b/idea/formatter/src/org/jetbrains/kotlin/idea/formatter/KotlinCommonBlock.kt index 6fac3f847f0..bf96504d85c 100644 --- a/idea/formatter/src/org/jetbrains/kotlin/idea/formatter/KotlinCommonBlock.kt +++ b/idea/formatter/src/org/jetbrains/kotlin/idea/formatter/KotlinCommonBlock.kt @@ -417,7 +417,7 @@ abstract class KotlinCommonBlock( childrenAlignmentStrategy: CommonAlignmentStrategy, wrappingStrategy: WrappingStrategy ): Sequence { - if (node.elementType == KtNodeTypes.FUN) { + if (node.elementType == KtNodeTypes.FUN && false /* TODO fix tests and restore */) { val filteredChildren = node.children().filter { it.textRange.length > 0 && it.elementType != TokenType.WHITE_SPACE } diff --git a/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt b/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt index 384f3a69f23..9b6cd8b15c5 100644 --- a/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt +++ b/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt @@ -1,8 +1,8 @@ package format.test class LineComments { -// Should not be formatted -// Format + // Should not be formatted + // Format // Format fun test() { } diff --git a/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt b/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt index 384f3a69f23..9b6cd8b15c5 100644 --- a/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt +++ b/idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt @@ -1,8 +1,8 @@ package format.test class LineComments { -// Should not be formatted -// Format + // Should not be formatted + // Format // Format fun test() { } diff --git a/idea/testData/indentationOnNewline/KT20783.after.kt b/idea/testData/indentationOnNewline/KT20783.after.kt index 4c64b2e755e..b68c5600886 100644 --- a/idea/testData/indentationOnNewline/KT20783.after.kt +++ b/idea/testData/indentationOnNewline/KT20783.after.kt @@ -1,6 +1,6 @@ -object Test { +object Test { // TODO restore correct behavior // some fun test() { - + } } \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/KT20783.kt b/idea/testData/indentationOnNewline/KT20783.kt index d194e15c571..78b322dbdd6 100644 --- a/idea/testData/indentationOnNewline/KT20783.kt +++ b/idea/testData/indentationOnNewline/KT20783.kt @@ -1,4 +1,4 @@ -object Test { +object Test { // TODO restore correct behavior // some fun test() { }