1

给定一个KFunction如何检查它是否是扩展功能?

我知道的唯一方法是检查是否function.extensionReceiverParameter返回null。有没有其他或推荐的方法?

4

1 回答 1

0

Currently, the only way to check this is to use: function.extensionReceiverParameter.

If it returns null it's not an extension function. If it returns a non-null value that function is a extension function

于 2017-05-09T13:50:42.660 回答