KT-7424: add test to show that inlining works for anonymous functions

This commit is contained in:
Alexey Andreev
2016-05-19 19:14:49 +03:00
parent db5baf7fa7
commit c5eaea846d
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,12 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
inline fun <T> block(f: () -> T): T = f()
fun test() = block(fun(): Int { return 23 })
fun box(): String {
assertEquals(23, test())
return "OK"
}