Test with calling abstract wrapper which is implemented in Kotlin.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
interface JavaInterface {
|
||||||
|
void run(Runnable r);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class Impl: JavaInterface {
|
||||||
|
override fun run(r: Runnable?) {
|
||||||
|
r?.run()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
var v = "FAIL"
|
||||||
|
Impl().run { v = "OK" }
|
||||||
|
return v
|
||||||
|
}
|
||||||
+5
@@ -135,6 +135,11 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/boxWithJava/samAdapters"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/boxWithJava/samAdapters"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callAbstractAdapter.kt")
|
||||||
|
public void testCallAbstractAdapter() throws Exception {
|
||||||
|
doTestWithJava("compiler/testData/codegen/boxWithJava/samAdapters/callAbstractAdapter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("comparator.kt")
|
@TestMetadata("comparator.kt")
|
||||||
public void testComparator() throws Exception {
|
public void testComparator() throws Exception {
|
||||||
doTestWithJava("compiler/testData/codegen/boxWithJava/samAdapters/comparator.kt");
|
doTestWithJava("compiler/testData/codegen/boxWithJava/samAdapters/comparator.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user