Files
2018-09-12 09:49:25 +03:00

20 lines
386 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1293
package foo
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"
}