Method References to Super Class Method

Hi there!

How can I do a method reference to a super class method?

In Java 8 you can do:

SubClass.super::method

However, in Kotlin it seems only to work a top level reference like that:

this::method

The following doesn’t work:

super::method

Do I miss something or is it not possible yet?

This is not possible at this time, and I don’t even think it was ever requested. Please file a YouTrack issue.

1 Like

I’ll do. Thanks !

You can find the feature request here:

https://youtrack.jetbrains.com/issue/KT-21103

1 Like