Extraction Engine: Generate function/property accessor with expression body (whenever applicable)
#KT-6405 Fixed
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
fun foo(a: Int): Int {
|
||||
// SIBLING:
|
||||
fun i(): Int {
|
||||
return a + 10
|
||||
}
|
||||
fun i() = a + 10
|
||||
|
||||
return i()
|
||||
}
|
||||
+1
-3
@@ -1,9 +1,7 @@
|
||||
fun foo() {
|
||||
val a = 1
|
||||
// SIBLING:
|
||||
fun b1(): Boolean {
|
||||
return a > 0
|
||||
}
|
||||
fun b1() = a > 0
|
||||
|
||||
if (b1()) {
|
||||
fun b(): Int { return 0 }
|
||||
|
||||
@@ -3,7 +3,5 @@ trait T{
|
||||
return i()
|
||||
}
|
||||
|
||||
fun i(): Int {
|
||||
return 1
|
||||
}
|
||||
fun i() = 1
|
||||
}
|
||||
Reference in New Issue
Block a user