Do not force new line in body for empty functions and function expressions (KT-10828)

#KT-10828 Fixed
This commit is contained in:
Nikolay Krasko
2016-12-06 16:39:17 +03:00
committed by Nikolay Krasko
parent 268d55104c
commit 2841931ffa
130 changed files with 334 additions and 575 deletions
+4 -8
View File
@@ -5,17 +5,13 @@
// ERROR: 'return' is not allowed here
// ERROR: Type mismatch: inferred type is String but Unit was expected
class Java8Class {
fun foo0(r: Function0<String>) {
}
fun foo0(r: Function0<String>) {}
fun foo1(r: Function1<Int, String>) {
}
fun foo1(r: Function1<Int, String>) {}
fun foo2(r: Function2<Int, Int, String>) {
}
fun foo2(r: Function2<Int, Int, String>) {}
fun helper() {
}
fun helper() {}
fun foo() {
foo0 { "42" }