Convert to Expression Body Intention: Do not remove declaration type if it affects the type of body expression
This commit is contained in:
+1
-1
@@ -5,4 +5,4 @@ fun foo(t: Array<Int>) {
|
||||
t.check(function())
|
||||
}
|
||||
|
||||
private fun function() = { it + 1 > 1 }
|
||||
private fun function(): (Int) -> Boolean = { it + 1 > 1 }
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun foo(t: Array<Int>) {
|
||||
t.check(function())
|
||||
}
|
||||
|
||||
private fun function() = { it + 1 > 1 }
|
||||
private fun function(): (Int) -> Boolean = { it + 1 > 1 }
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun foo(t: Array<Int>) {
|
||||
t.check(1, 2, function())
|
||||
}
|
||||
|
||||
private fun function() = { it + 1 > 1 }
|
||||
private fun function(): (Int) -> Boolean = { it + 1 > 1 }
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun foo(t: Array<Int>) {
|
||||
t.check(a = 1, b = 2, f = function())
|
||||
}
|
||||
|
||||
private fun function() = { it + 1 > 1 }
|
||||
private fun function(): (Int) -> Boolean = { it + 1 > 1 }
|
||||
Reference in New Issue
Block a user