Extract Function: Allow capturing local function references as lambda parameters
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// OPTIONS: true, false, false, false, true
|
||||
// PARAM_DESCRIPTOR: local final fun baz(m: kotlin.Int): Int defined in foo.bar
|
||||
// PARAM_DESCRIPTOR: value-parameter val n: kotlin.Int defined in foo
|
||||
// PARAM_TYPES: (kotlin.Int) -> Int
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
|
||||
// SIBLING:
|
||||
fun foo(n: Int): Int {
|
||||
fun bar(): Int {
|
||||
fun baz(m: Int) = m * n
|
||||
|
||||
return <selection>baz(n + 1)</selection>
|
||||
}
|
||||
|
||||
return bar()
|
||||
}
|
||||
Reference in New Issue
Block a user