Extract Function: Allow to extract local variables which are used outside of extracted fragment
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// SIBLING:
|
||||
fun main(args: Array<String>) {
|
||||
val a = i()
|
||||
lambda {
|
||||
a
|
||||
}
|
||||
}
|
||||
|
||||
fun i(): Int {
|
||||
val a = 1
|
||||
return a
|
||||
}
|
||||
|
||||
fun lambda(f: () -> Unit) {}
|
||||
Reference in New Issue
Block a user