Don't indent block comments of typealiases

#KT-22230 Fixed
This commit is contained in:
Dmitry Jemerov
2018-01-12 11:46:15 +01:00
parent c2b532b167
commit 1b6f6e8bf7
4 changed files with 18 additions and 1 deletions
@@ -723,7 +723,10 @@ private val INDENT_RULES = arrayOf(
strategy("Type aliases")
.within(KtNodeTypes.TYPEALIAS)
.notForType(KtTokens.TYPE_ALIAS_KEYWORD, KtTokens.EOL_COMMENT, KtNodeTypes.MODIFIER_LIST)
.notForType(
KtTokens.TYPE_ALIAS_KEYWORD, KtTokens.EOL_COMMENT, KtNodeTypes.MODIFIER_LIST, KtTokens.BLOCK_COMMENT,
KtTokens.DOC_COMMENT
)
.set(Indent.getContinuationIndent())
)
+4
View File
@@ -0,0 +1,4 @@
/**
* doc
*/
typealias Runnable = java.lang.Runnable
+4
View File
@@ -0,0 +1,4 @@
/**
* doc
*/
typealias Runnable = java.lang.Runnable
@@ -549,6 +549,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
doTest(fileName);
}
@TestMetadata("KT22230.after.kt")
public void testKT22230() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22230.after.kt");
doTest(fileName);
}
@TestMetadata("KeepLineBreak.after.kt")
public void testKeepLineBreak() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KeepLineBreak.after.kt");