Refactor FunctionReferenceGenerationStrategy
Draw a clear distinction between the referenced function's parameters and the anonymous synthetic function's parameters (see the comment). This will be useful in supporting advanced callable reference features like KT-8834
This commit is contained in:
-12
@@ -44,9 +44,6 @@ import org.jetbrains.kotlin.resolve.scopes.utils.ScopeUtilsKt;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
import org.jetbrains.kotlin.types.expressions.typeInfoFactory.TypeInfoFactoryKt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.diagnostics.Errors.TYPE_INFERENCE_ERRORS;
|
||||
import static org.jetbrains.kotlin.resolve.BindingContext.PROCESSED;
|
||||
|
||||
@@ -185,15 +182,6 @@ public class ExpressionTypingUtils {
|
||||
&& ((KtUnaryExpression) expression).getOperationReference().getReferencedNameElementType() == KtTokens.EXCLEXCL;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static List<KotlinType> getValueParametersTypes(@NotNull List<ValueParameterDescriptor> valueParameters) {
|
||||
List<KotlinType> parameterTypes = new ArrayList<>(valueParameters.size());
|
||||
for (ValueParameterDescriptor parameter : valueParameters) {
|
||||
parameterTypes.add(parameter.getType());
|
||||
}
|
||||
return parameterTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary case for local extensions is the following:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user