Format spaces around ::

This commit is contained in:
Ilya Zorin
2017-01-06 16:55:27 +03:00
committed by Dmitry Jemerov
parent 406bac684c
commit c5677f0428
4 changed files with 22 additions and 0 deletions
@@ -252,6 +252,8 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
between(WHEN_ENTRY, WHEN_ENTRY).lineBreakInCode()
around(COLONCOLON).spaces(0)
around(BY_KEYWORD).spaces(1)
betweenInside(IDENTIFIER, PROPERTY_DELEGATE, PROPERTY).spaces(1)
}
@@ -0,0 +1,7 @@
class Foo {
fun bar() {}
}
fun baz() {
Foo::bar
}
+7
View File
@@ -0,0 +1,7 @@
class Foo {
fun bar() {}
}
fun baz() {
Foo :: bar
}
@@ -326,6 +326,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
doTest(fileName);
}
@TestMetadata("FunctionReferenceOperator.after.kt")
public void testFunctionReferenceOperator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionReferenceOperator.after.kt");
doTest(fileName);
}
@TestMetadata("FunctionWithInference.after.kt")
public void testFunctionWithInference() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionWithInference.after.kt");