Is there way to have method reference for optional...
# codereview
e
Is there way to have method reference for optional receiver?
Copy code
customKeyListener?.onCustomKeyPressed()
something like
Copy code
customKeyListener::onCustomKeyPressed
e
Copy code
customKeyListener?.let { it::onCustomKeyPressed }
👍🏼 1
m
yeah, it would be nice if we could do:
customKeyListener?::onCustomKeyPressed
👌 2
kodee happy 1
m
Is that also covering method references?
e
if
?
were to be usable standalone then
? ::
would work
I don't think that proposal has a serious chance of making it into the language as is though
👍 1
e
Off topic - just found the youtrack user interface change