Files
kotlin-fork/compiler/testData/codegen/box/jvm8/defaults/defaultArgsViaAnonymousObject.kt
T
Mikhail Bogdanov b787c8c011 Support jvm default methods in IR
Fix several bugs around DefaultImpls
2020-04-09 07:37:32 +02:00

17 lines
280 B
Kotlin
Vendored

// !JVM_DEFAULT_MODE: enable
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface A {
@JvmDefault
fun foo(x: String = "OK"): String {
return x
}
}
fun box(): String {
val x = object : A {}
return x.foo()
}