Formatter: fix line break between label and property

#KT-22273 Fixed
This commit is contained in:
Dmitry Gridin
2019-11-01 10:06:55 +07:00
parent 7f1935b82e
commit 247619c565
3 changed files with 9 additions and 0 deletions
@@ -236,6 +236,7 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
beforeInside(CLASS, TokenSet.create(BODY, CLASS_BODY)).lineBreakInCode()
beforeInside(OBJECT_DECLARATION, TokenSet.create(BODY, CLASS_BODY)).lineBreakInCode()
beforeInside(PROPERTY, WHEN).spaces(0)
beforeInside(PROPERTY, LABELED_EXPRESSION).spacesNoLineBreak(1)
before(PROPERTY).lineBreakInCode()
after(DOC_COMMENT).lineBreakInCode()
+4
View File
@@ -38,3 +38,7 @@ fun test4() {
}
}
fun test5() {
L1@ val x: Int = 42
}
+4
View File
@@ -37,4 +37,8 @@ fun test4() {
{
}
}
fun test5() {
L1@ val x: Int = 42
}