Extract Function: Implement duplicate search

This commit is contained in:
Alexey Sedunov
2014-09-16 15:26:19 +04:00
parent 03e2b4d516
commit 741e5f61e9
30 changed files with 1110 additions and 201 deletions
@@ -0,0 +1,41 @@
// WITH_RUNTIME
// PARAM_TYPES: kotlin.Int
// PARAM_DESCRIPTOR: value-parameter val a: kotlin.Int defined in test
// SIBLING:
fun test(a: Int): Int {
<selection>println(a)
return a + 1</selection>
}
fun foo1(): Int {
val x = 1
println(x)
val y = x + 1
return y
}
fun foo2(): () -> Int {
val z = 1
return {
println(z)
z + 1
}
}
fun foo3() {
var t = 1
println(t)
t = t + 1
println(t)
}
fun foo4(a: Int): Int {
val t = println(a)
return a + 1
}
fun foo5(a: Int) {
println(a)
a + 1
}