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();
}
Aggregations