Compare commits

...

1 Commits

Author SHA1 Message Date
Alexey Tsvetkov
b73c1467da Add test for KT-16193 2017-02-09 16:50:48 +03:00
6 changed files with 42 additions and 0 deletions

View File

@@ -402,6 +402,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
doTest(fileName);
}
@TestMetadata("delegatedPropertyToInlineFunWithCrossinlineArg")
public void testDelegatedPropertyToInlineFunWithCrossinlineArg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyToInlineFunWithCrossinlineArg/");
doTest(fileName);
}
@TestMetadata("dependencyClassReferenced")
public void testDependencyClassReferenced() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");

View File

@@ -402,6 +402,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest(fileName);
}
@TestMetadata("delegatedPropertyToInlineFunWithCrossinlineArg")
public void testDelegatedPropertyToInlineFunWithCrossinlineArg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyToInlineFunWithCrossinlineArg/");
doTest(fileName);
}
@TestMetadata("dependencyClassReferenced")
public void testDependencyClassReferenced() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");

View File

@@ -0,0 +1,13 @@
================ Step #1 =================
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/MainKt$main$1.class
out/production/module/MainKt.class
out/production/module/Model.class
End of files
Compiling files:
src/main.kt
End of files
Exit code: OK
------------------------------------------

View File

@@ -0,0 +1,8 @@
package delegates
import kotlin.properties.Delegates
import kotlin.properties.ReadWriteProperty
inline fun crashMe(crossinline callback: () -> Unit): ReadWriteProperty<Any, Unit> {
return Delegates.observable(Unit) { desc, old, new -> callback() }
}

View File

@@ -0,0 +1,9 @@
import delegates.crashMe
class Model(private val factory: () -> Unit) {
var crashMe1 by crashMe(factory)
}
fun main(args: Array<String>) {
Model({ println("crashMe") })
}