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
+36
View File
@@ -0,0 +1,36 @@
// TARGET_BACKEND: JVM
// FILE: Base.java
public interface Base {
String getValue();
default String test() {
return getValue();
}
}
// FILE: Base2.java
public interface Base2 extends Base {
default String test() {
return "O" + getValue();
}
}
// FILE: main.kt
interface KBase : Base
interface Derived : KBase, Base2
class Fail : Derived {
override fun getValue() = "Fail"
}
fun box(): String {
val z = object : Derived by Fail() {
override fun getValue() = "K"
}
return z.test()
}