blob: 9fb7f98a1e013ce648705f2df70f618249908582 [file]
// WITH_STDLIB
package foo
import kotlin.test.assertEquals
interface Base {
abstract fun Int.foo(): String
}
open class BaseImpl(val s: String) : Base {
override fun Int.foo(): String = "Int.foo ${s}:${this}"
}
class Derived() : Base by BaseImpl("test") {
fun bar(x: Int): String = x.foo()
}
fun box(): String {
assertEquals("Int.foo test:5", Derived().bar(5))
return "OK"
}