More proper code to check if lambda is inlined. Parameter of inline function can be annotated with "noInline".

This commit is contained in:
Evgeny Gerashchenko
2015-04-07 19:56:44 +03:00
parent d24d750d34
commit 015da2f8ca
5 changed files with 42 additions and 6 deletions
@@ -0,0 +1,12 @@
fun f(a: Int): Int {
if (a < 5) {
run1(fun (): Int {
<caret>return 1
})
}
return 2
}
inline public fun <T> run1(noinline f: () -> T): T { }
//HIGHLIGHTED: return 1