Files
kotlin-fork/compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt
T
2018-08-09 14:22:46 +03:00

25 lines
414 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// FILE: B.java
class B {
static String test(A x) {
return A.DefaultImpls.foo(x);
}
}
// FILE: main.kt
interface A {
fun foo() = "OK"
}
fun box(): String {
val result = B.test(object : A {})
if (result != "OK") return "fail: $result"
return "OK"
}