salomonbrys
10/07/2015, 10:11 AMpublic interface Named {
val name: String
}
public fun Activity.named(): Named = object : Named {
override val name: String = getTitle().toString()
}
public class MyActivity : Activity(), Named by this.named() {
}
It does not compile because this
is not defined in the implementation by delegation (Named by this.named()
). Any idea how to fix this ?