Supported inlining functions which access properties via field.

This commit is contained in:
Evgeny Gerashchenko
2014-07-01 20:12:49 +04:00
parent 2259cc605f
commit 7ef5c75f26
7 changed files with 41 additions and 2 deletions
@@ -0,0 +1,7 @@
Cleaning output files:
out/production/module/test/TestPackage-usage-*.class
out/production/module/test/TestPackage.class
End of files
Compiling files:
src/usage.kt
End of files
@@ -0,0 +1,8 @@
package test
val property = ":)"
inline fun f(body: () -> Unit) {
println("i'm inline function" + property)
body()
}
@@ -0,0 +1,8 @@
package other
val property = ":)"
inline fun f(body: () -> Unit) {
println("i'm inline function" + property)
body()
}
@@ -0,0 +1,6 @@
package test
fun main(args: Array<String>) {
f { println("to be inlined") }
other.f { println("to be inlined") }
}
@@ -0,0 +1,6 @@
package test
fun main(args: Array<String>) {
f { println("to be inlined") }
other.f { println("to be inlined") }
}