Extract Function: Support multiple output values

This commit is contained in:
Alexey Sedunov
2014-09-04 17:28:25 +04:00
parent 7a15a88288
commit 76433571f8
68 changed files with 1293 additions and 319 deletions
@@ -1,6 +0,0 @@
// SIBLING:
fun foo() {
<selection>val a = 1
val b = 2</selection>
println(a + b)
}
@@ -1 +0,0 @@
Selected code fragment has multiple output values: val a: Int val b: Int
@@ -1,15 +0,0 @@
// SIBLING:
fun foo(a: Int): Int {
var b: Int = 1
val t = <selection>if (a > 0) {
b += a
b
}
else {
a
}</selection>
println(b)
return t
}
@@ -1 +0,0 @@
Selected code fragment has output values as well as alternative exit points
@@ -1,8 +0,0 @@
// SIBLING:
fun foo(a: Int): Int {
var b: Int = 1
<selection>b += a
println(b)
return b</selection>
}
@@ -1 +0,0 @@
Selected code fragment has output values as well as alternative exit points