Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/function/kt36188_2.kt
T
Nikolay Lunyak 3f1bf6112f [FIR] Report MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES
Reporting it for `VIRTUAL_MEMBER_HIDDEN`
is ok, because `VIRTUAL_MEMBER_HIDDEN`
has always been an error, so we are
allowed to treat these as overrides
implicitly.

^KT-59408 Fixed
^KT-59419 Fixed
^KT-57076 Fixed
2023-08-28 10:57:40 +00:00

24 lines
410 B
Kotlin
Vendored

// IGNORE_BACKEND: JS
// IGNORE_BACKEND_K2: ANY
// STATUS: This must be red code anyway, KT-36188
// Test for KT-36188 bug compatibility between non-IR and IR backends
interface A {
fun foo(a: String = "OK"): String
}
interface A2 : A
interface B {
fun foo(a: String = "Fail"): String
}
interface C : A2, B
class Impl : C {
override fun foo(a: String) = a
}
fun box(): String = Impl().foo()