Hey guys. So, i Have a abstract class in Java that...
# announcements
j
Hey guys. So, i Have a abstract class in Java that has a abstract method like this:
Copy code
public abstract class MyClass implements MyInterface {
    @Override
    public abstract <M extends MyInterface> MyModelType<M> getModelType();
}
How do i implement this in Kolin? i always get this:
Copy code
override fun <M : MyInterface?> getModelType(): MyModelType<M> {
        TODO
    }
but this is not what i want, in Java works fine
Copy code
@Override
    public MyModelType<MyClassImpl> getModelType() {
        return null;
    }
Any ideas on how to do it?
r
Your Java override snippet does not seem to match the abstract function, while your kotlin snippet does.
<M extends MyInterface>
and
<MyClassImpl>
are not the same thing.