Extract Function: Do not extract into lambda

This commit is contained in:
Alexey Sedunov
2014-07-04 18:21:13 +04:00
parent 0c49d48a48
commit 30192b4c40
32 changed files with 249 additions and 12 deletions
@@ -0,0 +1,3 @@
class A(val a: Int, val b: Int) {
val foo: Int get() = { <selection>a + b</selection> - 1 }.invoke()
}
@@ -0,0 +1,7 @@
class A(val a: Int, val b: Int) {
val foo: Int get() = { i() - 1 }.invoke()
fun i(): Int {
return a + b
}
}
@@ -0,0 +1,3 @@
val a = 1
val b = 1
val foo: Int get() = { <selection>a + b</selection> - 1 }.invoke()
@@ -0,0 +1,7 @@
val a = 1
val b = 1
val foo: Int get() = { i() - 1 }.invoke()
fun i(): Int {
return a + b
}