Support jvm default methods in IR

Fix several bugs around DefaultImpls
This commit is contained in:
Mikhail Bogdanov
2020-03-29 12:52:29 +02:00
parent e45a892499
commit b787c8c011
26 changed files with 373 additions and 53 deletions
@@ -0,0 +1,17 @@
// !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()
}