Extraction Engine: Generate function/property accessor with expression body (whenever applicable)

#KT-6405 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-12 16:15:35 +03:00
parent 9d8cfd04d9
commit 9cb42944d1
92 changed files with 142 additions and 295 deletions
@@ -1,7 +1,5 @@
class A(val a: Int, val b: Int) {
val foo: Int get() = i() - 1
private fun i(): Int {
return a + b
}
private fun i() = a + b
}
@@ -1,7 +1,5 @@
class A(val a: Int, val b: Int) {
val foo: Int get() = { i() - 1 }.invoke()
private fun i(): Int {
return a + b
}
private fun i() = a + b
}
@@ -2,6 +2,4 @@ val a = 1
val b = 1
val foo: Int get() = i() - 1
private fun i(): Int {
return a + b
}
private fun i() = a + b
@@ -2,6 +2,4 @@ val a = 1
val b = 1
val foo: Int get() = { i() - 1 }.invoke()
private fun i(): Int {
return a + b
}
private fun i() = a + b