Support local function references in codegen

#KT-3704 In Progress
 #KT-1183 In Progress
This commit is contained in:
Alexander Udalov
2013-12-17 23:14:43 +04:00
parent 07648583ed
commit 363fe607fc
11 changed files with 179 additions and 14 deletions
@@ -0,0 +1,15 @@
var state = 23
fun box(): String {
fun incrementState(inc: Int) {
state += inc
}
val inc = ::incrementState
inc(12)
inc(-5)
inc(27)
inc(-15)
return if (state == 42) "OK" else "Fail $state"
}