Extract Function: Allow to extract local variables which are used outside of extracted fragment
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// SIBLING:
|
||||
fun main(args: Array<String>) {
|
||||
<selection>val a = 1</selection>
|
||||
val t = object: T {
|
||||
override fun foo(n: Int) = n + a
|
||||
}
|
||||
}
|
||||
|
||||
trait T {
|
||||
fun foo(n: Int): Int
|
||||
}
|
||||
Reference in New Issue
Block a user