Added debug info
This commit is contained in:
+5
-2
@@ -224,10 +224,13 @@ class NewResolveOldInference(
|
||||
}
|
||||
|
||||
override fun contextForInvoke(variable: Candidate, useExplicitReceiver: Boolean): Pair<ReceiverValue, TowerContext<Candidate>> {
|
||||
assert(variable.resolvedCall.status.isSuccess)
|
||||
assert(variable.resolvedCall.status.possibleTransformToSuccess()) {
|
||||
"Incorrect status: ${variable.resolvedCall.status} for variable call: ${variable.resolvedCall} " +
|
||||
"and descriptor: ${variable.resolvedCall.candidateDescriptor}"
|
||||
}
|
||||
val calleeExpression = variable.resolvedCall.call.calleeExpression
|
||||
val variableDescriptor = variable.resolvedCall.resultingDescriptor
|
||||
assert(variable.resolvedCall.status.isSuccess && calleeExpression != null && variableDescriptor is VariableDescriptor) {
|
||||
assert(variable.resolvedCall.status.possibleTransformToSuccess() && calleeExpression != null && variableDescriptor is VariableDescriptor) {
|
||||
"Unexpected varialbe candidate: $variable"
|
||||
}
|
||||
val variableReceiver = ExpressionReceiver.create(calleeExpression!!,
|
||||
|
||||
@@ -67,7 +67,7 @@ interface CandidateWithBoundDispatchReceiver<out D : CallableDescriptor> {
|
||||
val dispatchReceiver: ReceiverValue?
|
||||
}
|
||||
|
||||
class ResolutionCandidateStatus(val diagnostics: List<ResolutionDiagnostic>) {
|
||||
data class ResolutionCandidateStatus(val diagnostics: List<ResolutionDiagnostic>) {
|
||||
val resultingApplicability: ResolutionCandidateApplicability = diagnostics.asSequence().map { it.candidateLevel }.max()
|
||||
?: ResolutionCandidateApplicability.RESOLVED
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user