Support inlining in scripts and outer expression capturing

#KT-7744 Fixed
This commit is contained in:
Michael Bogdanov
2015-05-18 13:23:12 +03:00
parent 226350b4ba
commit 5cb9671803
6 changed files with 59 additions and 3 deletions
@@ -0,0 +1,14 @@
// expected: rv: 2
fun foo(l: (Int) -> Int ): Int {
return l(1)
}
fun bar(p: Int): Int {
return p + 1
}
fun main(): Int {
return foo { x -> bar(x) }
}
main()