Extract Function: Allow capturing local function references as lambda parameters

This commit is contained in:
Alexey Sedunov
2015-04-13 14:37:18 +03:00
parent 86bb0d5bc5
commit daebf569ab
17 changed files with 212 additions and 9 deletions
@@ -0,0 +1,10 @@
// OPTIONS: true, false, false, false, true
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar(m: kotlin.Int): Int defined in foo
// PARAM_DESCRIPTOR: value-parameter val n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar(m: Int) = this * m * n
return <selection>n.bar(n + 1)</selection>
}