diff --git a/idea/src/org/jetbrains/jet/plugin/formatter/JetBlock.java b/idea/src/org/jetbrains/jet/plugin/formatter/JetBlock.java index 0477c51e616..cf99dbb4a29 100644 --- a/idea/src/org/jetbrains/jet/plugin/formatter/JetBlock.java +++ b/idea/src/org/jetbrains/jet/plugin/formatter/JetBlock.java @@ -324,6 +324,7 @@ public class JetBlock extends AbstractBlock { ASTIndentStrategy.forNode("Indent for parts") .in(PROPERTY, FUN) + .notForType(BLOCK) .set(Indent.getContinuationWithoutFirstIndent()), }; diff --git a/idea/testData/formatter/FunctionWithNewLineBrace.kt b/idea/testData/formatter/FunctionWithNewLineBrace.kt new file mode 100644 index 00000000000..10f601298b1 --- /dev/null +++ b/idea/testData/formatter/FunctionWithNewLineBrace.kt @@ -0,0 +1,3 @@ +fun test() +{ +} \ No newline at end of file diff --git a/idea/testData/formatter/FunctionWithNewLineBrace_after.kt b/idea/testData/formatter/FunctionWithNewLineBrace_after.kt new file mode 100644 index 00000000000..10f601298b1 --- /dev/null +++ b/idea/testData/formatter/FunctionWithNewLineBrace_after.kt @@ -0,0 +1,3 @@ +fun test() +{ +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/formatter/JetFormatterTest.java b/idea/tests/org/jetbrains/jet/formatter/JetFormatterTest.java index 5da03038273..ee9fc756d9e 100644 --- a/idea/tests/org/jetbrains/jet/formatter/JetFormatterTest.java +++ b/idea/tests/org/jetbrains/jet/formatter/JetFormatterTest.java @@ -60,6 +60,10 @@ public class JetFormatterTest extends AbstractJetFormatterTest { doTest(); } + public void testFunctionWithNewLineBrace() throws Exception { + doTest(); + } + public void testGetterAndSetter() throws Exception { doTest(); }