Do not force new line in body for empty functions and function expressions (KT-10828)
#KT-10828 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
268d55104c
commit
2841931ffa
+4
-8
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user