Supported inlining functions which access properties via field.

Original commit: 7ef5c75f26
This commit is contained in:
Evgeny Gerashchenko
2014-07-01 20:12:49 +04:00
parent 1f91c2b724
commit 1e3b4ddc32
6 changed files with 40 additions and 0 deletions
@@ -141,6 +141,11 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest("jps-plugin/testData/incremental/packageFilesChangedInTurn/");
}
@TestMetadata("packageInlineFunctionAccessingField")
public void testPackageInlineFunctionAccessingField() throws Exception {
doTest("jps-plugin/testData/incremental/packageInlineFunctionAccessingField/");
}
@TestMetadata("packageInlineFunctionChanged")
public void testPackageInlineFunctionChanged() throws Exception {
doTest("jps-plugin/testData/incremental/packageInlineFunctionChanged/");
@@ -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") }
}