Debugger: Remove debugger-related hacks in resolution

Candidate ordering should be the same in ordinary Kotlin code and in evaluated expressions.
With the invention of 'foo_field' syntax, there is no need to do these nasty things any more.
This commit is contained in:
Yan Zhulanow
2019-05-22 19:25:22 +09:00
parent b4f515a436
commit 54f78a2920
9 changed files with 30 additions and 46 deletions
@@ -105,7 +105,7 @@ public class ResolutionResultsHandler {
successfulAndIncomplete.addAll(successfulCandidates);
successfulAndIncomplete.addAll(incompleteCandidates);
OverloadResolutionResultsImpl<D> results = chooseAndReportMaximallySpecific(
successfulAndIncomplete, true, context.isDebuggerContext, checkArgumentsMode, languageVersionSettings);
successfulAndIncomplete, true, checkArgumentsMode, languageVersionSettings);
if (results.isSingleResult()) {
MutableResolvedCall<D> resultingCall = results.getResultingCall();
resultingCall.getTrace().moveAllMyDataTo(context.trace);
@@ -160,7 +160,7 @@ public class ResolutionResultsHandler {
return recordFailedInfo(tracing, trace, myResolver.filterOutEquivalentCalls(new LinkedHashSet<>(thisLevel)));
}
OverloadResolutionResultsImpl<D> results = chooseAndReportMaximallySpecific(
thisLevel, false, false, checkArgumentsMode, languageVersionSettings);
thisLevel, false, checkArgumentsMode, languageVersionSettings);
return recordFailedInfo(tracing, trace, results.getResultingCalls());
}
}
@@ -196,7 +196,6 @@ public class ResolutionResultsHandler {
private <D extends CallableDescriptor> OverloadResolutionResultsImpl<D> chooseAndReportMaximallySpecific(
@NotNull Set<MutableResolvedCall<D>> candidates,
boolean discriminateGenerics,
boolean isDebuggerContext,
@NotNull CheckArgumentTypesMode checkArgumentsMode,
@NotNull LanguageVersionSettings languageVersionSettings
) {
@@ -217,7 +216,7 @@ public class ResolutionResultsHandler {
}
Set<MutableResolvedCall<D>> specificCalls =
myResolver.chooseMaximallySpecificCandidates(refinedCandidates, checkArgumentsMode, discriminateGenerics, isDebuggerContext);
myResolver.chooseMaximallySpecificCandidates(refinedCandidates, checkArgumentsMode, discriminateGenerics);
if (specificCalls.size() == 1) {
return OverloadResolutionResultsImpl.success(specificCalls.iterator().next());