Move JVM8 box test to common

This commit is contained in:
Mikhael Bogdanov
2018-10-16 11:06:27 +02:00
parent b61608aba7
commit ac8e1a0124
110 changed files with 0 additions and 0 deletions
@@ -0,0 +1,32 @@
// TARGET_BACKEND: JVM
// FILE: Base.java
public interface Base {
String getValue();
default String test() {
return getValue();
}
}
// FILE: main.kt
public interface BaseKotlin : Base {
override fun getValue() = "OK"
override fun test(): String {
return getValue();
}
}
class OK : BaseKotlin {
override fun getValue() = "OK"
}
fun box(): String {
val ok = object : BaseKotlin by OK() {
override fun getValue() = "Fail"
}
return ok.test()
}