Files
kotlin/compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt
Juan Chen 4c04ad2371 FIR: Add bindings for dispatch receiver parameters
Before this commit, such descriptors have null owners, which causes problems when the getter of the owner property is called.
2019-12-27 10:13:44 +03:00

17 lines
277 B
Kotlin
Vendored

interface I {
fun foo(x: Int = 23): String
}
abstract class Base : I
class C : Base(), I {
override fun foo(x: Int) = "C:$x"
}
fun box(): String {
val x: I = C()
val r = x.foo() + ";" + x.foo(42)
if (r != "C:23;C:42") return "fail: $r"
return "OK"
}