From 10101dc2b4e94c02920bd7983e097d5e8959392f Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Mon, 18 Oct 2021 17:02:12 +0300 Subject: [PATCH] Add more accurate docs to the ResolvedCall --- .../resolve/calls/model/ResolvedCall.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCall.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCall.java index 3f9e85bfa50..21782f3044b 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCall.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCall.java @@ -39,11 +39,25 @@ public interface ResolvedCall { @NotNull Call getCall(); - /** A target callable descriptor as it was accessible in the corresponding scope, i.e. with type arguments not substituted */ + /** + * A target callable descriptor as it was accessible in the corresponding scope, i.e. with type arguments not substituted. + *

+ * Note that only type parameters from the declaration itself (i.e. declared type parameters) remain unsubstituted. + *

+ * Type parameters from the other declarations (e.g. a containing class' type parameters) are substituted just as in + * {@link ResolvedCall#getResultingDescriptor()}. + */ @NotNull D getCandidateDescriptor(); - /** Type arguments are substituted. This descriptor is guaranteed to have NO declared type parameters */ + /** + * A target callable descriptor with all type arguments substituted. + *

+ * The resulting descriptor must not have any unsubstituted type. However, the descriptor's + * {@link CallableDescriptor#getTypeParameters()} are unchanged and still refer to the declaration's declared type parameters. + * + * @see ResolvedCall#getTypeArguments() + */ @NotNull D getResultingDescriptor();