I want to write something like that in Kotlin.
open class View where P:Presenter { val presenter: P = ... } open class
where P:Presenter { val presenter: P = ... } open class
The standard way (called F-bounded polymorphism) is
open class View, P: Presenter> { ... }
It may make more sense to put out elsewhere here, depending on the specifics:
out
open class View, out P: Presenter> { ... }