Extract Function: Allow to extract local variables which are used outside of extracted fragment

This commit is contained in:
Alexey Sedunov
2014-07-03 18:55:11 +04:00
parent 540e8b8b46
commit d95f6383b7
35 changed files with 439 additions and 93 deletions
@@ -0,0 +1,17 @@
// PARAM_TYPES: kotlin.Int, Comparable<Int>
// PARAM_TYPES: kotlin.Int, Number, Comparable<Int>, Any
// PARAM_DESCRIPTOR: value-parameter val a: kotlin.Int defined in foo
// PARAM_DESCRIPTOR: val b: kotlin.Int defined in foo
// SIBLING:
fun foo(a: Int) {
val b: Int = 1
<selection>if(a > 0) {
println(a)
}
val c: Int
println(b)</selection>
c = 1
println(c)
}