Support bridges in interfaces for default methods

This commit is contained in:
Mikhail Bogdanov
2020-03-27 18:21:38 +01:00
parent 93b915c77a
commit a3f930d2e4
18 changed files with 790 additions and 5 deletions
@@ -0,0 +1,25 @@
// !JVM_DEFAULT_MODE: all-compatibility
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface Test<T> {
fun test(p: T): T {
return p
}
}
class TestClass : Test<String> {
override fun test(p: String): String {
return p + "K"
}
}
fun <T> execute(t: Test<T>, p: T): T {
return t.test(p)
}
fun box(): String {
return execute(TestClass(), "O")
}