Extract Function: Exclude unused parameters (jump-based control flow)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: value-parameter val a: kotlin.Int defined in foo
|
||||
// SIBLING:
|
||||
fun foo(a: Int, b: Int): Int {
|
||||
<selection>if (a > 0) return a + b</selection>
|
||||
return 0
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: value-parameter val a: kotlin.Int defined in foo
|
||||
// SIBLING:
|
||||
fun foo(a: Int, b: Int): Int {
|
||||
if (b(a)) return a + b
|
||||
return 0
|
||||
}
|
||||
|
||||
fun b(a: Int): Boolean {
|
||||
if (a > 0) return true
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user