Support closures in codegen for callable references

This commit is contained in:
Alexander Udalov
2013-12-19 17:59:08 +04:00
parent 596b1622a3
commit d3a811aa7e
8 changed files with 95 additions and 16 deletions
@@ -0,0 +1,7 @@
fun foo(until: Int): String {
fun bar(x: Int): String =
if (x == until) "OK" else bar(x + 1)
return (::bar)(0)
}
fun box() = foo(10)