Don't indent block comments of typealiases
#KT-22230 Fixed
This commit is contained in:
@@ -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
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* doc
|
||||
*/
|
||||
typealias Runnable = java.lang.Runnable
|
||||
Vendored
+4
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user