12db8f1551
#KT-4479 Fixed
19 lines
348 B
Kotlin
Vendored
19 lines
348 B
Kotlin
Vendored
package foo
|
|
|
|
trait 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"
|
|
} |