this seems weird to me - i have a kotlin class tha...
# getting-started
g
this seems weird to me - i have a kotlin class that implements an interface by a delegate (using the
by
keyword). the interface is defined in java and has some 
default
 methods. my class does not override those methods. i was expecting them to be forwarded to the delegate, but instead the default version is used. do i have to explicitly override all
default
methods in order to forward them to the delegate?
d
I think this was fixed in 1.4 wiht the new IR (https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/, see "Fixing an issue with delegates" section)
👀 1
g
that doesn’t quite seem to be it - i tried recompiling with
-Xjvm-default=all
and it’d didn’t make a difference. also this is a java interface, so i’m not sure it’s the same issue
d
Hm, maybe they did not add it for Java interfaces, which seems like a bug to me.
Are you using the new IR?
Or is that the default already? 🤔
g
IR?
g
thanks.. i’ve been out of kotlin for a bit 🙂
d
I think the new default handling is a feature of the new IR
g
i am not
d
That would probably explain why it has no effect
g
eh.. either i can’t figure out the right incantation with maven or it’s not the issue. oh well thanks for your help