Method References to Super Class Method


#1

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?


#2

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


#3

I’ll do. Thanks !


#4

You can find the feature request here:

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