Extraction Engine: Generate function/property accessor with expression body (whenever applicable)
#KT-6405 Fixed
This commit is contained in:
@@ -3,7 +3,5 @@ class A {
|
||||
val x = i()
|
||||
val y = i()
|
||||
|
||||
private fun i(): Int {
|
||||
return 1 + 1
|
||||
}
|
||||
private fun i() = 1 + 1
|
||||
}
|
||||
+1
-3
@@ -4,6 +4,4 @@ fun foo() {
|
||||
val y = i()
|
||||
}
|
||||
|
||||
private fun i(): Int {
|
||||
return 1 + 1
|
||||
}
|
||||
private fun i() = 1 + 1
|
||||
|
||||
@@ -5,6 +5,4 @@ fun main(args: Array<String>) {
|
||||
val y = i()
|
||||
}
|
||||
|
||||
private fun i(): Int {
|
||||
return 1 + 1
|
||||
}
|
||||
private fun i() = 1 + 1
|
||||
|
||||
@@ -11,6 +11,4 @@ fun foo(): Int {
|
||||
}
|
||||
}
|
||||
|
||||
private fun i(s: String?): Int {
|
||||
return s!!.length
|
||||
}
|
||||
private fun i(s: String?) = s!!.length
|
||||
@@ -24,6 +24,4 @@ fun bar() {
|
||||
i(f(), f())
|
||||
}
|
||||
|
||||
private fun i(a: Int, b: Int): Int {
|
||||
return a + b * a
|
||||
}
|
||||
private fun i(a: Int, b: Int) = a + b * a
|
||||
Reference in New Issue
Block a user