karelpeeters
12/09/2018, 9:25 AMV
, an type not known at compile time?Rishabh Harit
12/09/2018, 9:26 AMkarelpeeters
12/09/2018, 9:27 AMV
ends up doing adds some more functions to implement?Rishabh Harit
12/09/2018, 9:28 AMBaseActivity
is anyways abstract. Shouldn’t that be the responsibility of the concrete class.Andreas Sinz
12/09/2018, 9:57 AMinline <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)