Extract Function: In case of top-level and member declarations place extracted function after the original container
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ trait Callable<T> {
|
||||
}
|
||||
|
||||
fun foo(a: Int): Int {
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
val o = <selection>object: Callable<Int> {
|
||||
val b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
for (n in 1..a) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
for (n in 1..a) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
var b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
var b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
var b: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// NEXT_SIBLING:
|
||||
// SIBLING:
|
||||
fun foo(t: Int): Int {
|
||||
<selection>val x = t + 1
|
||||
if (x > 0) return x</selection>
|
||||
|
||||
Reference in New Issue
Block a user