Extract Function: Allow to extract local variables which are used outside of extracted fragment
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fun test(): Int {
|
||||
<selection>class A(val n: Int = 1)</selection>
|
||||
|
||||
return A().n + 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Following declarations are used outside of selected code fragment: final class A value-parameter val n: Int = ...
|
||||
@@ -0,0 +1,5 @@
|
||||
fun test(): Int {
|
||||
<selection>fun bar(): Int = 1</selection>
|
||||
|
||||
return bar() + 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Following declarations are used outside of selected code fragment: local final fun bar(): Int
|
||||
Reference in New Issue
Block a user