Surround with: move declaration out from block
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fun foo() {
|
||||
<selection>"start"
|
||||
open class A {}
|
||||
class B: A() {}
|
||||
"end"</selection>
|
||||
|
||||
val c = B()
|
||||
val d = A()
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun foo() {
|
||||
open class A {}
|
||||
class B: A() {}
|
||||
if (<caret>) {
|
||||
"start"
|
||||
"end"
|
||||
}
|
||||
|
||||
val c = B()
|
||||
val d = A()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fun foo() {
|
||||
<selection>class A {
|
||||
fun test() {}
|
||||
}
|
||||
val d: A = A()</selection>
|
||||
|
||||
d.test()
|
||||
A()
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fun foo() {
|
||||
class A {
|
||||
fun test() {}
|
||||
}
|
||||
val d: A
|
||||
if (<caret>) {
|
||||
d = A()
|
||||
}
|
||||
|
||||
d.test()
|
||||
A()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
<selection>val a: String = "aaa"
|
||||
val b = a</selection>
|
||||
|
||||
a.charAt(1)
|
||||
b.charAt(1)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fun foo() {
|
||||
val a: String
|
||||
val b: String
|
||||
if (<caret>) {
|
||||
a = "aaa"
|
||||
b = a
|
||||
}
|
||||
|
||||
a.charAt(1)
|
||||
b.charAt(1)
|
||||
}
|
||||
Reference in New Issue
Block a user