Search in sources :

Example 1 with TracingStrategy

use of org.jetbrains.kotlin.resolve.calls.tasks.TracingStrategy in project kotlin by JetBrains.

the class ControlStructureTypingUtils method resolveSpecialConstructionAsCall.

/*package*/
ResolvedCall<FunctionDescriptor> resolveSpecialConstructionAsCall(@NotNull Call call, @NotNull ResolveConstruct construct, @NotNull List<String> argumentNames, @NotNull List<Boolean> isArgumentNullable, @NotNull ExpressionTypingContext context, @Nullable MutableDataFlowInfoForArguments dataFlowInfoForArguments) {
    SimpleFunctionDescriptorImpl function = createFunctionDescriptorForSpecialConstruction(construct, argumentNames, isArgumentNullable);
    TracingStrategy tracing = createTracingForSpecialConstruction(call, construct.getName(), context);
    TypeSubstitutor knownTypeParameterSubstitutor = createKnownTypeParameterSubstitutorForSpecialCall(construct, function, context.expectedType);
    ResolutionCandidate<FunctionDescriptor> resolutionCandidate = ResolutionCandidate.<FunctionDescriptor>create(call, function, knownTypeParameterSubstitutor);
    OverloadResolutionResults<FunctionDescriptor> results = callResolver.resolveCallWithKnownCandidate(call, tracing, context, resolutionCandidate, dataFlowInfoForArguments);
    assert results.isSingleResult() : "Not single result after resolving one known candidate";
    return results.getResultingCall();
}
Also used : TracingStrategy(org.jetbrains.kotlin.resolve.calls.tasks.TracingStrategy) SimpleFunctionDescriptorImpl(org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl)

Aggregations

SimpleFunctionDescriptorImpl (org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl)1 TracingStrategy (org.jetbrains.kotlin.resolve.calls.tasks.TracingStrategy)1