Can someone help me with extending a class and gen...
# announcements
g
Can someone help me with extending a class and generics? I am trying to implement this class http://javadoc.jenkins.io/hudson/model/listeners/RunListener.html. In Java I can just use
MyClass extends extends RunListener<Run>
when I try to do that in Kotlin
class RunMetricsPublisher : RunListener<Run>()
Intellij complains that
two type arguments expected for class Run
. I have tried
<out Run>
and several other combinations. The Run class (http://javadoc.jenkins.io/hudson/model/Run.html) looks like this
class Run<JobT extends Job<JobT,RunT>,RunT extends Run<JobT,RunT>>
. I read the Kotlin docs on generics and this one is over my head.