Extract Function: In case of top-level and member declarations place extracted function after the original container
This commit is contained in:
+8
-8
@@ -1,14 +1,14 @@
|
||||
// NEXT_SIBLING:
|
||||
fun b(a: Int, b: Int): Boolean {
|
||||
if (a > 0) throw Exception("")
|
||||
if (a + b > 0) return true
|
||||
println(a - b)
|
||||
return false
|
||||
}
|
||||
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
for (n in 1..b) {
|
||||
if (b(a, b)) break
|
||||
}
|
||||
}
|
||||
|
||||
fun b(a: Int, b: Int): Boolean {
|
||||
if (a > 0) throw Exception("")
|
||||
if (a + b > 0) return true
|
||||
println(a - b)
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user