Open ilya-g opened 1 year ago
Note: the functions on unconstrained generic receivers, such as let, apply, also, still should not be included in this list.
This seems like a really opinionated requirement. Could you please elaborate on why you think this is the right way? And what is the logic to decide which extension functions should be resolved and which shouldn't?
I can give some examples:
fun Any?.ext() {} // can be called on anything, should be resolved because there is a specific type
fun <T> T.ext() {} // can be called on anything, should not be resolved?
fun <T : Any?> T.ext() {} // can be called on anything, should be resolved?
Is your feature request related to a problem? Please describe
Suppose we have an interface and an extension function on a generic type constrained in upper bound by this interface
The function is applicable on all receivers that implement
AutoCloseable
. Despite that, it is not shown in the extensions list ofAutoCloseable
and its implementers.Describe the solution you'd like
Include such extension functions on generic receivers into the list of members+extensions of types that conform to the generic receiver type constraints.
Note: if the extension function's generic receiver type is constrained by several types, this function should be shown only for types that satisfy all of the constraints.
Note: the functions on unconstrained generic receivers, such as
let
,apply
,also
, still should not be included in this list.