You want to implement `V`, an type not known at co...
# announcements
k
You want to implement
V
, an type not known at compile time?
r
Yes, it would make my Mvp implementation a bit simpler
But I see your point
k
But you logically can't do that, what if whatever
V
ends up doing adds some more functions to implement?
r
BaseActivity
is anyways abstract. Shouldn’t that be the responsibility of the concrete class.
a
what about
Copy code
inline <reified V: BaseView> MyActivity() {
    return object : BaseActivity<V, P> {
          //What methods does `V` have?
     }
That's the first problem. The second one is that you can't tell the compiler that
V
must be either an interface or an open class, because if you use a final class as
V
, the whole thing doesn't work too (can't inherit from a final class)