passsy
09/11/2016, 7:50 PMinterface ErrorView {
fun showError(code: Int)
}
class ErrorViewImpl(val activity: Activity) : ErrorView {
override fun showError(code: Int) =
Toast.makeText(activity, "Error: $code", Toast.LENGTH_SHORT).show()
}
// results in Error: 'this' is not defined in this context
class MyActivity : AppCompatActivity(), ErrorView by ErrorViewImpl(this) {
}
Is this even possible?