https://kotlinlang.org logo
Title
g

gildor

12/13/2017, 7:18 AM
You cannot do that for functions. But there is KEEP proposal about this - https://github.com/Kotlin/KEEP/pull/89
e

edwardwongtl

12/13/2017, 7:22 AM
Good to know that there are people having this though, hope it can come true in the future
g

gildor

12/13/2017, 7:27 AM
It’s actually little bit different case, this keep proposed feature that allow to delegate call to another function. In your case you just want to have field with overloaded method reference
e

edwardwongtl

12/13/2017, 7:28 AM
If this KEEP can support overloaded functions than it may fit my need
g

gildor

12/13/2017, 7:30 AM
There is no magic way to distingue between overloaded functions with the same name, it’s just impossible, you should somehow specify which version do you want
So, solution - just specify property type explicitly