about class delegation ``` interface ErrorView { ...
# announcements
p
about class delegation
Copy code
interface 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?