Extract Function: Support multiple output values
This commit is contained in:
-6
@@ -1,6 +0,0 @@
|
||||
// SIBLING:
|
||||
fun foo() {
|
||||
<selection>val a = 1
|
||||
val b = 2</selection>
|
||||
println(a + b)
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
Selected code fragment has multiple output values: val a: Int val b: Int
|
||||
-15
@@ -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
@@ -1 +0,0 @@
|
||||
Selected code fragment has output values as well as alternative exit points
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
var b: Int = 1
|
||||
|
||||
<selection>b += a
|
||||
println(b)
|
||||
return b</selection>
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
Selected code fragment has output values as well as alternative exit points
|
||||
Reference in New Issue
Block a user